Files
project57-x/nginx.conf
T
mdszxy fe18e608dc
CI Pipeline / check-commit (push) Successful in 7s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 27s
CI Pipeline / deploy (push) Failing after 2s
feat: proxy embed assets to in-cluster project57 [deploy]
2026-10-05 17:42:36 +08:00

42 lines
1.1 KiB
Nginx Configuration File

server {
listen 3000;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /api/health {
default_type text/plain;
add_header Content-Type text/plain;
return 200 "ok";
}
# A 站无公网域名:浏览器只访问 B 站,由 B 反代到集群内 project57
location /embed/ {
proxy_pass ${A_UPSTREAM}/embed/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /images/ {
proxy_pass ${A_UPSTREAM}/images/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /api/contact {
proxy_pass ${A_UPSTREAM}/api/contact;
proxy_http_version 1.1;
proxy_set_header Host $host;
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;
}
}