fix: CORS 配置添加 Windows Tauri 生产模式 origin http://tauri.localhost

This commit is contained in:
小鱼开发
2026-05-19 11:36:53 +08:00
parent 09ea37bae1
commit dd3864db1f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ ALGORITHM=HS256
# === CORS 配置 ===
# 本地开发: 允许 localhost
# 测试/生产服: 填写实际域名,如 https://app.yourdomain.com
CORS_ORIGINS=http://localhost:1420,http://127.0.0.1:1420,http://localhost:8080
CORS_ORIGINS=http://localhost:1420,http://127.0.0.1:1420,http://localhost:8080,tauri://localhost,http://tauri.localhost
# === AI 平台配置 ===
+1 -1
View File
@@ -88,7 +88,7 @@ class Settings(BaseSettings):
# CORS 配置
CORS_ORIGINS: str = Field(
default="http://localhost:1420,http://127.0.0.1:1420,http://localhost:8080,http://127.0.0.1:8080,tauri://localhost",
default="http://localhost:1420,http://127.0.0.1:1420,http://localhost:8080,http://127.0.0.1:8080,tauri://localhost,http://tauri.localhost",
description="允许的跨域来源(逗号分隔)",
)