diff --git a/openresty/nginx/conf/includes/http/server/locations/rest/cors.conf b/openresty/nginx/conf/includes/http/server/locations/rest/cors.conf deleted file mode 100644 index 45866e9c..00000000 --- a/openresty/nginx/conf/includes/http/server/locations/rest/cors.conf +++ /dev/null @@ -1,19 +0,0 @@ -if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, PATCH, DELETE, OPTIONS'; - add_header 'Access-Control-Allow-Headers' $http_access_control_request_headers; - add_header 'Access-Control-Allow-Credentials' true; - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - add_header 'Content-Length' 0; - return 204; -} - -if ($request_method = 'POST') { - set_by_lua_block $dummy { - ngx.header['Access-Control-Allow-Origin'] = '*'; - ngx.header['Access-Control-Allow-Methods'] = 'GET, POST, PATCH, DELETE, OPTIONS'; - ngx.header['Access-Control-Allow-Credentials'] = 'true'; - return true - } -} \ No newline at end of file