From 3e59d41c2387f937433282e750283c3311e1c7b2 Mon Sep 17 00:00:00 2001 From: Khor Shu Heng <32997938+khorshuheng@users.noreply.github.com> Date: Sun, 19 Jan 2025 22:46:57 +0800 Subject: [PATCH] fix: allow device-id as header (#1176) --- nginx/nginx.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 65d79169..640898af 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -91,14 +91,14 @@ http { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' $cors_origin always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version, Device-Id' always; add_header 'Access-Control-Max-Age' 3600 always; return 204; } add_header 'Access-Control-Allow-Origin' $cors_origin always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version, Device-Id' always; add_header 'Access-Control-Max-Age' 3600 always; location ~* ^/api/workspace/([a-zA-Z0-9_-]+)/publish$ { @@ -108,14 +108,14 @@ http { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' $cors_origin always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version, Device-Id' always; add_header 'Access-Control-Max-Age' 3600 always; return 204; } add_header 'Access-Control-Allow-Origin' $cors_origin always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Client-Version, Device-Id' always; add_header 'Access-Control-Max-Age' 3600 always; } @@ -144,7 +144,7 @@ http { # Handle CORS add_header 'Access-Control-Allow-Origin' $cors_origin always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Accept, Device-Id' always; add_header 'Access-Control-Max-Age' 3600 always; # Timeouts