diff --git a/default.conf b/default.conf index d69ee88..bdb288e 100644 --- a/default.conf +++ b/default.conf @@ -211,6 +211,31 @@ server { + location /codeword/ { + 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; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + 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 always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + proxy_set_header Referer $host; + proxy_set_header Origin $http_origin; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Client-Port $remote_port; + proxy_set_header Origin $host; + + proxy_pass http://10.7.0.6:59664/; + } + + + + + location /codeword/v1.0.0/ {