Files
tuanwei-admin/.env.production
T
weicw-dshsa 00e0e70e85 fix(config): 生产 API 改用 https,避免后台 https 部署时被 mixed-content 拦截
线上后台登录请求被浏览器判为「(已屏蔽: mixed-content)」,因为 .env.production 里
VITE_API_URL 写的是明文 http://twai-api.gxmu.edu.cn/api,而后台以 https 部署。

改为 https://twai-api.gxmu.edu.cn/api(实测 /api/login 返回 200,证书有效)。
顺带说明:聊天用的 WebSocket 由该地址推导成 wss://<同 host>/chat/{userId},
协议会自动跟随,不需要额外配置。
2026-10-21 13:46:47 +08:00

5 lines
247 B
Bash

VITE_APP_NAME=后台管理系统
# 生产 API 必须与站点同协议:后台以 https 部署时,http 请求会被浏览器按
# 混合内容(mixed-content)整条拦掉,登录直接失败。
VITE_API_URL=https://twai-api.gxmu.edu.cn/api