diff --git a/.config/example.yml b/.config/example.yml index 1a6b0f5b4b..489cceec34 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -110,10 +110,10 @@ port: 3000 # Changes how the server interpret the origin IP of the request. # # Any format supported by Fastify is accepted. -# Default: do not trust any proxies (i.e. trustProxy: false) +# Default: trust all proxies (i.e. trustProxy: true) # See: https://fastify.dev/docs/latest/reference/server/#trustproxy # -# trustProxy: false +# trustProxy: 1 # ┌──────────────────────────┐ #───┘ PostgreSQL configuration └──────────────────────────────── diff --git a/packages/backend/src/server/ServerService.ts b/packages/backend/src/server/ServerService.ts index 4e05322b12..1286b4dad6 100644 --- a/packages/backend/src/server/ServerService.ts +++ b/packages/backend/src/server/ServerService.ts @@ -75,7 +75,7 @@ export class ServerService implements OnApplicationShutdown { @bindThis public async launch(): Promise { const fastify = Fastify({ - trustProxy: this.config.trustProxy ?? false, + trustProxy: this.config.trustProxy ?? true, logger: false, }); this.#fastify = fastify;