You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The balancing proxy at the hosting platform we use includes port 80 in req.headers.host (domain.com:80). When this module redirects a request, the redirect url looks like https://domain:80. Browsers seem to auto-fix it, but some other tools actually try to make a secure connection on port 80, and they fail.
I believe req.hostname should be used instead of req.headers.host when generating the redirect url. The trustProtoHeader setting won't be necessary then - app.set('trust proxy', true); would control the behavior.
I know the project doesn't get much updates, so this is mostly a warning for people to be aware of a potential issue.
The text was updated successfully, but these errors were encountered:
The balancing proxy at the hosting platform we use includes port 80 in req.headers.host (
domain.com:80
). When this module redirects a request, the redirect url looks likehttps://domain:80
. Browsers seem to auto-fix it, but some other tools actually try to make a secure connection on port 80, and they fail.I believe
req.hostname
should be used instead ofreq.headers.host
when generating the redirect url. ThetrustProtoHeader
setting won't be necessary then -app.set('trust proxy', true);
would control the behavior.I know the project doesn't get much updates, so this is mostly a warning for people to be aware of a potential issue.
The text was updated successfully, but these errors were encountered: