From 4b1212c5ecb1b42db93ad5a550d9464be5799ac5 Mon Sep 17 00:00:00 2001 From: Stephan Kerkman Date: Thu, 28 May 2026 10:20:56 +0200 Subject: [PATCH] fix: use \$http_host in nginx to preserve port for CSRF validation Co-Authored-By: Claude Sonnet 4.6 --- nginx/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/default.conf b/nginx/default.conf index d4de274..08cb45f 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -16,7 +16,7 @@ server { location / { proxy_pass http://django; - proxy_set_header Host $host; + proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;