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 getFullUrl function uses req.get('host') to get the host to specify in the RELEASES file.
If I understand https://expressjs.com/en/guide/behind-proxies.html correctly, It seems that express only updates req.hostname
I can confirm that behind the proxy that: req.hostname does return the X-Forwarded-Host when the trust proxy is enabled.
But req.get('host') returns the name of the host in the request.
For example:
If the the main url is updateserver.example.com which I balance to updateserver1.example.com and updateserver2.example.com
Then with the trust proxy enabled, the value of req.hostname is updateserver.example.com
Where the req.get('host') has a value of updateserver1.example.com
The text was updated successfully, but these errors were encountered:
Running nuts behind apache load balancer.
The
getFullUrl
function usesreq.get('host')
to get the host to specify in the RELEASES file.If I understand https://expressjs.com/en/guide/behind-proxies.html correctly, It seems that express only updates
req.hostname
I can confirm that behind the proxy that:
req.hostname
does return theX-Forwarded-Host
when the trust proxy is enabled.But
req.get('host')
returns the name of the host in the request.For example:
If the the main url is
updateserver.example.com
which I balance toupdateserver1.example.com
andupdateserver2.example.com
Then with the trust proxy enabled, the value of
req.hostname
isupdateserver.example.com
Where the
req.get('host')
has a value ofupdateserver1.example.com
The text was updated successfully, but these errors were encountered: