Closed yuliyv closed 5 years ago
Add middleware configuration at the site router level. Supports path specific middleware, and site level middleware.
Site Specific Middleware (applies to ALL routes including amphora specified routes
module.exports.middleware = [ (req, res, next) => { console.log(req.headers); next(); } ]
Route Specific Middleware
module.exports.routes = [ { path: '/', middleware: [ (req, res, next) => { console.log(req.headers); next(); } ] ]
Add middleware configuration at the site router level. Supports path specific middleware, and site level middleware.
Site Specific Middleware (applies to ALL routes including amphora specified routes
Route Specific Middleware