Files
rice-pk-xhs/nginx.conf
T
codex-bot 682f1de9cb
Verify mini program and deploy preview / verify-deploy (push) Successful in 4m34s
Use fixed same-origin API proxy
2026-09-18 22:59:20 +08:00

27 lines
671 B
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
location /api/ {
resolver 127.0.0.11 valid=10s ipv6=off;
set $api_upstream http://pk-lab-api:8000;
proxy_pass $api_upstream;
proxy_http_version 1.1;
proxy_set_header Host $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 / {
try_files $uri $uri/ /index.html;
}
location = /health {
access_log off;
return 200 "ok\n";
add_header Content-Type text/plain;
}
}