From 31c2bf5d917359cac8f50cc41c69a1f15b035893 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Fri, 31 Oct 2025 15:15:19 -0500 Subject: [PATCH] fix: Issue with electron not displaying se --- docker/nginx.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docker/nginx.conf b/docker/nginx.conf index 38e8cd18..7d4c4c55 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -28,6 +28,25 @@ http { add_header X-Content-Type-Options nosniff always; add_header X-XSS-Protection "1; mode=block" always; + # CORS headers for Electron iframe + add_header Access-Control-Allow-Origin * always; + add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS, PATCH" always; + add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization" always; + add_header Access-Control-Allow-Credentials "true" always; + + # Handle preflight requests + if ($request_method = 'OPTIONS') { + return 204; + } + + # Serve static assets directly + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + root /usr/share/nginx/html; + expires 1y; + add_header Cache-Control "public, immutable"; + try_files $uri =404; + } + location / { root /usr/share/nginx/html; index index.html index.htm;