We're trying to redirect all the hits from http
to https
. Currently the application is deployed on elastic beanstalk and it's allowing both http and https, but we only want the https
.
I've tried adding the server object in config.js
to make the check
pb.config.server.ssl.use_x_forwarded && req.headers["x-forwarded-proto"] !== "https"
work in pencilblue.js
, but it broke the code on localhost as well as live.
Could you please suggest a way to redirect all http
hits to https
?
Thanks a lot.
I have countered this issue and got a solution, you can set
use_x_forwarded
to true inconfig.js
file.