My environment :
1.) 1 load balance server (nginx)
2.) 2 web servers (express.js running on node.js)
3.) 1 database server
Hello, I am trying to force my user to use https. I look through many tutorials on how to implement https in express.js.
However, as I look through many tutorials, I found 2 ways on how to redirect user http to https.
- redirecting user to https on nginx config ( on load balance server )
- redirecting user to https on express.js ( on web server )
My question is:
which is a better way to implement HSTS for my web app (on a load balance or on a web server)
Also please kindly give little information on the advantages and disadvantages of each of the options
Thank you very much :)