fix: trust proxy headers in production (behind SSL-terminating reverse proxy)
This commit is contained in:
1 parent
9f230ffcc9
commit
43976194cb
1 file changed
+8
@@ -13,6 +13,14 @@ export const appUrl = env.get('APP_URL')
|
||||
* The configuration settings used by the HTTP server
|
||||
*/
|
||||
export const http = defineConfig({
|
||||
/**
|
||||
* Trust the X-Forwarded-* headers sent by a reverse proxy (e.g. Nginx).
|
||||
* Required so that AdonisJS sees the real client IP and the correct
|
||||
* protocol (https) when running behind an SSL-terminating proxy.
|
||||
* Set to 1 to trust only the immediately-preceding proxy.
|
||||
*/
|
||||
trustProxy: app.inProduction,
|
||||
|
||||
/**
|
||||
* Generate a unique request id for each incoming request.
|
||||
* Useful to correlate logs and debug a request flow.
|
||||
|
||||
Reference in new issue
Block a user