Files
zimonianhua 07f4be3fc1
Docker Build and Push / build (push) Has been cancelled
build: 移除Dockerfile中的mailcap依赖并优化前端配置
- 删除Dockerfile中不必要的mailcap包以精简镜像
- 将前端配置从process.env改为import.meta.env以适配现代构建工具
- 移除Go代码中手动设置mime类型的冗余逻辑
- 修复静态资源路由路径格式(/assets改为assets/)
- 优化导入语句格式和代码结构
2026-02-10 20:46:06 +08:00

17 lines
352 B
JavaScript

// config.js
const isProduction = import.meta.env.PROD;
// 从 window 对象获取路径前缀(由后端注入或通过 API 获取)
const getPathPrefix = () => {
return window.__URL_PATH_PREFIX__ || '';
};
const config = {
apiUrl: isProduction ? '' : 'http://localhost:8000',
pathPrefix: getPathPrefix(),
};
export default config;