diff --git a/lib/www/server/api/index.js b/lib/www/server/api/index.js index e011c6f..123444b 100644 --- a/lib/www/server/api/index.js +++ b/lib/www/server/api/index.js @@ -64,7 +64,10 @@ const allMeta = (key, value) => { return { all: [ meta(key, value) ] }; }; -// These routes do not require authentication +// +// NOTICE These routes do not require authentication +// + app.map({ '*': { all: [ meta() ] }, // Create the req.meta object '/login': { @@ -82,6 +85,9 @@ app.map({ } }); +// +// WARNING Every route from here onwards requires authentication! +// app.use(mw.auth.authentify); // Don't process the request if the data hasn't changed