From fd976f5bc192bc52f7a9d23aade1f5c05c5d8ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= Date: Mon, 26 Feb 2024 15:18:33 +0100 Subject: [PATCH] ansible: Use Forwarded instead of X-Forwarded-For header --- ansible/roles/motis-proxy/files/Rocket.toml | 2 +- ansible/roles/nginx/templates/transitous.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/motis-proxy/files/Rocket.toml b/ansible/roles/motis-proxy/files/Rocket.toml index fafedec2..8b7e7129 100644 --- a/ansible/roles/motis-proxy/files/Rocket.toml +++ b/ansible/roles/motis-proxy/files/Rocket.toml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later [release] -ip_header = "X-Forwarded-For" +ip_header = "Forwarded" [release.proxy] # TODO: Add /address and /ppr/route once we have it set up diff --git a/ansible/roles/nginx/templates/transitous.conf.j2 b/ansible/roles/nginx/templates/transitous.conf.j2 index a36412c2..37c34ddd 100644 --- a/ansible/roles/nginx/templates/transitous.conf.j2 +++ b/ansible/roles/nginx/templates/transitous.conf.j2 @@ -42,7 +42,7 @@ server { location /api/ { proxy_pass http://localhost:8000/; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Forwarded $remote_addr; } # API Documentation