Files
hair/nginx/hair-gateway.conf
T
xsl 544c2a83d6 feat(gateway): 接入52号发际线接口与公开测试页
新增52号同路径转发,沿用现有主备派发、鉴权、队列和图片URL改写。空图片保留既有base64字段名,不带入worker算法及IP限制。

同步52号测试页、图片解析和矩形叠加依赖,公开页面不包含内部Token。补全网关契约与部署文档,Nginx示例读取超时延长至660秒。

验证:42项网关测试通过;临时网关连接真实GPU worker,5号三档与52号七型URL、长图裁切和边框均通过浏览器检查。
2026-11-04 11:15:58 +08:00

34 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 外网网关 nginx 配置
# 切换到网关时:把此文件链接到 /etc/nginx/sites-enabled/ 并重载 nginx
#
# 当前 hair.conf 代理 → 127.0.0.1:8000(mock app)
# 此文件代理 → 127.0.0.1:8080(网关)
# 切换时只需换 enabled 下的 symlink 即可。
server {
listen 80;
server_name hair.xiangsilian.com;
# 请求体大小限制(网关层兜底)
client_max_body_size 2m;
# 代理到网关
location / {
proxy_pass http://127.0.0.1:8080;
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;
# 网关内部转发可能耗时较长(worker 处理 + 排队)
proxy_read_timeout 660s;
proxy_send_timeout 90s;
}
# 标注图直接由网关托管,nginx 不缓存小图
location /static/ {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
}
}