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
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 updatesreq.hostname
I can confirm that behind the proxy that:
req.hostname
does return theX-Forwarded-Host
when the trust proxy is enabled. Butreq.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 thereq.get('host')
has a value ofupdateserver1.example.com