From 1631423bd9b18365c68af9068f6dbccdc4fd4664 Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Wed, 28 Jul 2021 17:20:25 +0200 Subject: [PATCH] Add additional allowed headers for CORS --- vendor/docker/webapp.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/docker/webapp.conf b/vendor/docker/webapp.conf index 0185cdb1d..30bcc1dd4 100644 --- a/vendor/docker/webapp.conf +++ b/vendor/docker/webapp.conf @@ -23,7 +23,7 @@ server { add_header 'Access-Control-Allow-Origin' "$http_origin" always; add_header 'Access-Control-Allow-Credentials' 'true' always; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS' always; - add_header 'Access-Control-Allow-Headers' 'Accept,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always; + add_header 'Access-Control-Allow-Headers' 'Accept,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always; # required to be able to read Authorization header in frontend add_header 'Access-Control-Expose-Headers' 'Authorization' always; } @@ -33,7 +33,7 @@ server { add_header 'Access-Control-Allow-Origin' "$http_origin"; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'Accept,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; + add_header 'Access-Control-Allow-Headers' 'Accept,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Headers,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0;