Files
kami_frontend/deploy/nginx/default.conf
danial b2cd3daabc refactor(nginx): 优化 Nginx 配置并调整 API 路径
- 移除了 Nginx 配置中的错误页面重定向指令
- 添加了 Nginx 的连接超时时间设置
- 修改了京东和沃尔玛卡片信息检查的 API 路径
2025-03-03 21:03:26 +08:00

23 lines
673 B
Plaintext

server {
listen 12400;
server_name localhost;
client_max_body_size 100M; # 全局设置,影响所有的 server 块
location / {
root /app;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://NGINX_CONFIG_URL:12401/api/;
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_connect_timeout 120;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_http_version 1.1;
}
}