Fix mixed origin

This commit is contained in:
Alexandre
2025-05-30 06:08:27 +02:00
committed by GitHub
parent 9dc0c5ffa9
commit 43b9fdce5e

View File

@@ -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;