From 2afd831d11163d81bff1868cbce496d75242609a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 27 Feb 2026 23:58:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(config):=20=E7=BB=9F=E4=B8=80=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=90=86=E5=9C=B0=E5=9D=80=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=B7=B7=E5=90=88=E5=86=85=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除生产环境中的硬编码HTTP API地址 - 统一使用/proxy路径进行API调用 - 避免HTTPS站点调用HTTP资源的混合内容安全问题 - 确保开发和生产环境的一致性配置 --- src/config/setting.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/setting.ts b/src/config/setting.ts index 0110ac8..4731888 100644 --- a/src/config/setting.ts +++ b/src/config/setting.ts @@ -26,7 +26,8 @@ export const AI_API_URL = // Note: browsers cannot call http from an https site (mixed-content); prefer same-origin proxy. export const OLLAMA_API_URL = import.meta.env.VITE_OLLAMA_API_URL || - (import.meta.env.DEV ? '/proxy' : 'http://47.119.165.234:11434'); + // Prefer same-origin reverse proxy in production too (avoid https mixed-content). + '/proxy'; /** * 以下配置一般不需要修改