fix(config): 统一使用代理地址避免混合内容问题
- 移除生产环境中的硬编码HTTP API地址 - 统一使用/proxy路径进行API调用 - 避免HTTPS站点调用HTTP资源的混合内容安全问题 - 确保开发和生产环境的一致性配置
This commit is contained in:
@@ -26,7 +26,8 @@ export const AI_API_URL =
|
|||||||
// Note: browsers cannot call http from an https site (mixed-content); prefer same-origin proxy.
|
// Note: browsers cannot call http from an https site (mixed-content); prefer same-origin proxy.
|
||||||
export const OLLAMA_API_URL =
|
export const OLLAMA_API_URL =
|
||||||
import.meta.env.VITE_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';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以下配置一般不需要修改
|
* 以下配置一般不需要修改
|
||||||
|
|||||||
Reference in New Issue
Block a user