fix: production CSRF, ProxyFix, and SSE streaming issues

This commit is contained in:
Your Name
2026-03-18 11:21:42 +02:00
parent 88cc92c252
commit aed02e36e5
10 changed files with 773 additions and 22 deletions

View File

@@ -67,6 +67,22 @@ server {
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
gzip_min_length 1000;
# SSE streaming for assistant chat
location /api/assistant/chat/stream {
proxy_pass http://backend;
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;
proxy_set_header Connection '';
proxy_http_version 1.1;
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding off;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
}
# API requests → Flask
location /api/ {
proxy_pass http://backend;