diff --git a/nginx.conf b/nginx.conf index 453c7f4..13864e5 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,7 +3,12 @@ server { root /usr/share/nginx/html; index index.html; - location ~ ^/api/(auth|users|notes|events|exams|courses|sessions|marks|attendance|work|pomodoro|settings|subjects|terms|health|time)(/|$) { + # Proxy the whole /api/* namespace, not a hand-maintained allowlist: an + # enumerated list silently 404s (falls through to the SPA -> HTML -> the + # client's JSON.parse fails) every time the backend or frontend gains a + # resource the list forgot. homework, messages, and questions were all + # already broken this way. + location /api/ { rewrite ^/api(/.*)$ $1 break; proxy_pass http://hezarfen-backend:8080; proxy_http_version 1.1;