From bc5461b51fa0956b53f5c3c158de234799eab3bd Mon Sep 17 00:00:00 2001 From: Gilles Mouchard Date: Mon, 24 Jan 2022 16:09:16 +0100 Subject: [PATCH] Added PUT methods in CORS header field 'Access-Control-Allow-Methods'. --- docker/cors.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/cors.conf b/docker/cors.conf index 14b4c12..0def5bf 100644 --- a/docker/cors.conf +++ b/docker/cors.conf @@ -1,6 +1,6 @@ if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' $allowOrigin always; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE'; # # Custom headers and headers various browsers *should* be OK with but aren't @@ -18,18 +18,18 @@ if ($request_method = 'OPTIONS') { if ($request_method = 'POST') { add_header 'Access-Control-Allow-Origin' $allowOrigin always; add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,key'; } if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' $allowOrigin always; add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,key'; } if ($request_method = 'DELETE') { add_header 'Access-Control-Allow-Origin' $allowOrigin always; add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,key'; } -- GitLab