Node.js redirect CSS 302 Moved Temporarily -
when use redirect :
.use(function (req, res, next) { var url = req.originalurl; if (url != "/login" && !req.session.email) { res.redirect("/login"); } next(); })
it looks css files can not load correctly, want load status 200 instead of 302 1 :
your middleware redirecting css requests.
need make not that.
you want put after static files middleware, won't run @ static files.
Comments
Post a Comment