Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ADDRESS option optional, determined automatically if not provided. #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 21, 2021

  1. Make ADDRESS option optional, determined automatically if not provided.

    The ADDRESS env variable is used for advertising the address of the service
    only. If it is not provided, it can be determined automatically using the
    HTTP Request headers 'Host' and 'X-Forwarded-*'. This approach uses ExpressJS
    provided functionality but requires 'trusting' headers forwarded from proxies.
    
    Deployers can control the trusted proxies using the TRUST_PROXY option,
    documented in the code only as it's very edge-case.
    
    This approach supports the best of both worlds; ADDRESS will use a logical
    (probably accurate) value by default, but can be overridden in the case of
    unusual proxy scenario or a canonical URL is preferred.
    jgroffen committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    70daca8 View commit details
    Browse the repository at this point in the history