27 lines
800 B
Plaintext
27 lines
800 B
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /srv/pda-h5;
|
|
|
|
location = /healthz {
|
|
default_type text/plain;
|
|
add_header Cache-Control "no-store" always;
|
|
return 200 "ok\n";
|
|
}
|
|
# API优先于站点敏感文件正则,避免DRIVER_LICENSE被LICENSE规则误拦截。
|
|
location ^~ /gateway-api/ {
|
|
client_max_body_size 55m;
|
|
proxy_pass ${API_UPSTREAM}/api/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $proxy_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
location / {
|
|
index index.html;
|
|
try_files $uri $uri/ =404;
|
|
add_header Cache-Control "no-store" always;
|
|
}
|
|
}
|