Middleware

Alexey Gordeyev edited this page Apr 28, 2015 · 13 revisions

Back to Home

Middleware for route

Global middleware setup in project /config/middleware.js

var useragent = require('express-useragent');

module.exports = function(app, express) {
        // Cross-site request forgery middleware
        app.use(express.csrf());
        // Exposing user-agent middleware
        app.use(useragent.express());
        // Add custom middleware here ...
        // ...
        // ...
};

Middleware for route

Back to Home

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.