配置 Nginx 反向代理和 Ngrok 内网穿透支持

- 添加 Nginx 反向代理配置(支持 ngrok 域名)
- 创建统一的 API 工具函数(自动适配域名)
- 更新前端 API 配置支持相对路径
- 配置支付宝回调地址使用 ngrok URL
- 优化 Docker Compose 配置(仅暴露 80 端口)
- 添加完整的部署和配置文档
This commit is contained in:
AIGC Developer
2025-11-03 18:09:23 +08:00
parent 149b201300
commit d5f7569a3a
21 changed files with 2167 additions and 10 deletions

View File

@@ -1,10 +1,12 @@
import axios from 'axios'
import { ElMessage } from 'element-plus'
import router from '@/router'
import { getApiBaseURL } from '@/utils/apiHelper'
// 创建axios实例
// 自动检测:如果通过 Nginx 访问(包含 ngrok使用相对路径否则使用完整 URL
const api = axios.create({
baseURL: 'http://localhost:8080/api',
baseURL: getApiBaseURL(),
timeout: 900000, // 增加到15分钟适应视频生成时间
withCredentials: true,
headers: {