From c7fa8b2ce82c96d2c7c9844960540e9805e85e6b Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 16 Aug 2019 16:06:17 +0200 Subject: [PATCH] Line --- sites-available/elastic.kevinmidboe.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sites-available/elastic.kevinmidboe.conf b/sites-available/elastic.kevinmidboe.conf index b3af132..bbae291 100644 --- a/sites-available/elastic.kevinmidboe.conf +++ b/sites-available/elastic.kevinmidboe.conf @@ -39,12 +39,14 @@ server { add_header 'Content-Length' 0; return 204; } + if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' 'https://kevinmidboe.com'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; } + if ($request_method = 'POST') { add_header 'Access-Control-Allow-Origin' 'https://kevinmidboe.com'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';