-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters