refactor(ProjectManage): 修改 AI助手打开链接的拼接方式

- 将 URL 初始化方式改为使用当前窗口位置的主机名- 在原有 URL 对象安全拼接参数的基础上,增加了对主机名的动态获取
This commit is contained in:
du.meimei
2025-05-27 17:08:16 +08:00
parent ce53f41623
commit 56153fcf9c

View File

@@ -2,25 +2,28 @@ server {
listen 80 default_server;
server_name _;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
# 跳转到伊利GPT
location /yiligpt {
return 302 https://yiligpt.x.digitalyili.com/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share;
}
location / {
root /var/www/html;
index index.html index.htm;
try_files $uri $uri/ //index.html;
try_files $uri $uri/ /index.html;
}
# 反向代理配置:将 /yiligpt 映射到外部链接
location /yiligpt {
proxy_pass https://yiligpt.x.digitalyili.com/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share ;
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;
# redirect server error pages to the static page /50x.html
# 如果目标服务器使用 HTTPS需要以下设置
proxy_ssl_server_name on;
proxy_ssl_verify on;
}
# 错误页面
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
}
}