diff --git a/.platform/nginx/confid/nginx.conf b/.platform/nginx/confid/nginx.conf index 9290369..c43520f 100644 --- a/.platform/nginx/confid/nginx.conf +++ b/.platform/nginx/confid/nginx.conf @@ -34,19 +34,6 @@ http { listen 80 default_server; listen [::]:80 default_server; - location /ws-chat { - proxy_pass http://springboot; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_read_timeout 600; - proxy_send_timeout 600; - proxy_buffering off; - proxy_request_buffering off; - gzip off; - } - location / { proxy_pass http://springboot; @@ -58,19 +45,19 @@ http { # ───────────────────────────────────────────────────────── add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type'; proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Authorization $http_authorization; + proxy_set_header Host $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; + if ($request_method = OPTIONS) { add_header Access-Control-Allow-Origin * always; - add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always; + add_header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS" always; add_header Access-Control-Allow-Headers "Authorization, Content-Type" always; return 204; }