Skip to content

When proxy-ing the update server does not seem to use the X-Forwarded-Host for the windows Releases file #166

@loneparadox

Description

@loneparadox

Running nuts behind apache load balancer.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions