Files
pk-lab-xhs/nginx.conf
T
codex-bot 3dfd887a0c
Verify mini program and deploy preview / verify-deploy (push) Successful in 24s
Route preview API through Docker network
2026-09-18 22:52:25 +08:00

32 lines
791 B
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
location = /runtime-env.js {
alias /tmp/runtime-env.js;
add_header Cache-Control "no-store";
}
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;
}
}