Update default.conf
This commit is contained in:
parent
7e1ccf16a7
commit
4feb2fab6b
30
default.conf
30
default.conf
@ -6,6 +6,10 @@ server {
|
|||||||
client_max_body_size 100M;# kill cache
|
client_max_body_size 100M;# kill cache
|
||||||
add_header Last-Modified $date_gmt;
|
add_header Last-Modified $date_gmt;
|
||||||
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
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;
|
if_modified_since off;
|
||||||
expires off;
|
expires off;
|
||||||
etag off;
|
etag off;
|
||||||
@ -25,16 +29,9 @@ server {
|
|||||||
proxy_cache off;
|
proxy_cache off;
|
||||||
|
|
||||||
if ($request_method = OPTIONS) {
|
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;
|
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/;
|
proxy_pass http://10.8.0.5:1492/amocrm/;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,16 +159,8 @@ server {
|
|||||||
|
|
||||||
location /customer/v1.0.0/ {
|
location /customer/v1.0.0/ {
|
||||||
if ($request_method = OPTIONS) {
|
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;
|
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-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Client-Port $remote_port;
|
proxy_set_header X-Client-Port $remote_port;
|
||||||
proxy_set_header Origin $host;
|
proxy_set_header Origin $host;
|
||||||
@ -520,3 +509,12 @@ server {
|
|||||||
|
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
server {
|
||||||
|
listen 9123;
|
||||||
|
|
||||||
|
server_name stub;
|
||||||
|
|
||||||
|
location /status {
|
||||||
|
stub_status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user