From 43b9fdce5e6af9b95171f1efd6f21a398bf53a73 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 30 May 2025 06:08:27 +0200 Subject: [PATCH] Fix mixed origin --- portainer/rootfs/etc/nginx/templates/ingress.gtpl | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/portainer/rootfs/etc/nginx/templates/ingress.gtpl b/portainer/rootfs/etc/nginx/templates/ingress.gtpl index 00521c7a1..ef36473c0 100644 --- a/portainer/rootfs/etc/nginx/templates/ingress.gtpl +++ b/portainer/rootfs/etc/nginx/templates/ingress.gtpl @@ -4,7 +4,6 @@ server { include /etc/nginx/includes/server_params.conf; include /etc/nginx/includes/proxy_params.conf; client_max_body_size 0; - proxy_set_header Origin ""; location / { proxy_pass {{ .protocol }}://backend/; @@ -13,23 +12,14 @@ server { proxy_connect_timeout 30m; proxy_send_timeout 30m; proxy_read_timeout 30m; - - # Improve ip handling - proxy_hide_header X-Powered-By; - 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; - proxy_set_header Accept-Encoding ""; - - # Ensure the backend knows the correct host - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Origin ""; } location /api/websocket/ { proxy_pass {{ .protocol }}://backend/api/websocket/; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + proxy_set_header Origin ""; resolver 127.0.0.11 valid=180s; proxy_connect_timeout 30m; proxy_send_timeout 30m;