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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -