fix FORCE_HTTPS
add ip_header env
This commit is contained in:
5
deploy/nginx/api_proxy.conf
Normal file
5
deploy/nginx/api_proxy.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
proxy_pass http://backend;
|
||||
proxy_set_header X-Real-IP __IP_HEADER__;
|
||||
proxy_set_header Host $http_host;client_max_body_size 200M;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection '';
|
||||
@@ -1,3 +1,7 @@
|
||||
location /api/judge_server_heartbeat {
|
||||
include api_proxy.conf;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
@@ -3,10 +3,7 @@ location /public {
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://backend;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
client_max_body_size 200M;
|
||||
include api_proxy.conf;
|
||||
}
|
||||
|
||||
location /data/ {
|
||||
|
||||
Reference in New Issue
Block a user