7. Express behind proxies
Express behind proxies
When running an Express app behind a proxy, set (by using app.set()) the application variable trust proxy
to one of the values listed in the following table.
Although the app will not fail to run if the application variable trust proxy
is not set, it will incorrectly register the proxy’s IP address as the client IP address unless trust proxy
is configured.
Type | Value |
---|---|
Boolean | If If |