1 Star 0 Fork 0

LDMING/maxun

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nginx.conf 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
karishmas6 提交于 2024-10-31 14:46 . chore: handle timeouts
server {
listen 80;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Add timeout configurations
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# Add error handling
proxy_intercept_errors on;
error_page 502 503 504 /50x.html;
}
location ~ ^/(record|workflow|storage|auth|integration|proxy|api-docs) {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'keep-alive'; # Ensure connections remain open
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Timeout configurations
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# Error handling for these routes
proxy_intercept_errors on;
error_page 502 503 504 /50x.html;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ldming/maxun.git
git@gitee.com:ldming/maxun.git
ldming
maxun
maxun
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385