From 42872c68f8ff0894549aceb133924a5fb45870ec Mon Sep 17 00:00:00 2001 From: Mikhail Date: Wed, 31 May 2023 16:28:04 +0000 Subject: [PATCH] Update file default.conf --- default.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/default.conf b/default.conf index 265f12e..c440041 100644 --- a/default.conf +++ b/default.conf @@ -22,9 +22,16 @@ server { add_header Access-Control-Allow-Credentials true always; } location /user/ { + if ($request_method = OPTIONS) { + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type always; + return 200; + } add_header Access-Control-Allow-Origin $http_origin always; add_header Access-Control-Allow-Credentials true always; add_header Access-Control-Allow-Headers content-type,authorization always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; proxy_pass http://pena-auth-service:8080; }