From 81ffcfd9bf198bb2052196d5458abc71ae22950f Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Tue, 25 Aug 2026 14:41:22 +1000 Subject: [PATCH] Fix cors --- etc-docker/nginx.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/etc-docker/nginx.conf b/etc-docker/nginx.conf index 9ecea851..f1194471 100644 --- a/etc-docker/nginx.conf +++ b/etc-docker/nginx.conf @@ -27,13 +27,14 @@ http { listen 80; server_name 0.0.0.0; - location * { - add_header Access-Control-Allow-Origin *; - } - location / { add_header Cache-Control must-revalidate; add_header Cache-Control public; + # Mirrors the CORS middleware in app/stubs/server.ts so the + # frontend can fetch static files (changes.txt, server_overview.json, ...) + # from a localhost dev server without hitting CORS restrictions. + add_header Access-Control-Allow-Origin *; + add_header Access-Control-Allow-Headers 'content-type,x-requested-with'; root /home/lacuna/server/var/www/public; # For debugging: add_header X-URI $uri always; -- 2.51.2