Closed PherricOxide closed 12 years ago
This would be accomplished by using passport.authenticate() as app-level middleware (rather than on specific routes), like so:
app.configure(function() {
app.use(express.logger());
app.use(passport.initialize());
app.use(passport.authenticate('basic'));
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});
This probably isn't a bug, but I want everything on the server to be password protected with basic HTTP authentication. This includes files under the express.static() folder. In the example code provided, none of the static files trigger the passport authentication. How would one do this?