mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-11-18 08:40:29 +00:00
【issues/9358】docker部署AI应用插件调用报Connection refused:nginx转发Host补全端口
前端nginx转发时Host不带端口,后端getBaseUrl取到默认80端口, endpoint为空的AI插件(如商品导购)等自调用拼出 http://jeecg-boot-system/jeecg-boot 导致连接失败。 - Dockerfile:Host 改为 jeecg-boot-system:8080 - Dockerfile.cloud:Host 改为网关 jeecg-boot-gateway:9999,网关据此生成正确的 X_GATEWAY_BASE_PATH Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6b287c4903
commit
e75950259a
@ -11,7 +11,8 @@ RUN echo "server { \
|
||||
rewrite ^/jeecgboot/?(.*)\$ /jeecg-boot/\$1 break; \
|
||||
proxy_pass http://\$jeecg_system:8080; \
|
||||
proxy_redirect off; \
|
||||
proxy_set_header Host jeecg-boot-system; \
|
||||
#Host需带端口,否则后端getBaseUrl拿到默认80端口,AI插件等自调用失败 issues/9358 \
|
||||
proxy_set_header Host jeecg-boot-system:8080; \
|
||||
proxy_set_header X-Real-IP \$remote_addr; \
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
|
||||
} \
|
||||
|
||||
@ -11,7 +11,8 @@ RUN echo "server { \
|
||||
rewrite ^/jeecgboot/?(.*)\$ /\$1 break; \
|
||||
proxy_pass http://\$jeecg_gateway:9999; \
|
||||
proxy_redirect off; \
|
||||
proxy_set_header Host jeecg-boot-system; \
|
||||
#Host需为网关地址带端口,网关据此生成X_GATEWAY_BASE_PATH,否则AI插件等自调用失败 issues/9358 \
|
||||
proxy_set_header Host jeecg-boot-gateway:9999; \
|
||||
proxy_set_header X-Real-IP \$remote_addr; \
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
|
||||
} \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user