Update default.conf

This commit is contained in:
Mikhail 2024-06-16 19:15:37 +00:00
parent 7e1ccf16a7
commit 4feb2fab6b

@ -6,6 +6,10 @@ server {
client_max_body_size 100M;# kill cache
add_header Last-Modified $date_gmt;
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
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,device,browser,os,devicetype,response-type always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
if_modified_since off;
expires off;
etag off;
@ -25,16 +29,9 @@ server {
proxy_cache off;
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,authorization,device,browser,os,devicetype,response-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,authorization,device,browser,os,devicetype,response-type always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_pass http://10.8.0.5:1492/amocrm/;
}
@ -162,16 +159,8 @@ server {
location /customer/v1.0.0/ {
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,authorization,response-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,authorization,response-type always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Client-Port $remote_port;
proxy_set_header Origin $host;
@ -520,3 +509,12 @@ server {
return 301 https://$host$request_uri;
}
server {
listen 9123;
server_name stub;
location /status {
stub_status;
}
}