fix: CORS 配置添加 Windows Tauri 生产模式 origin http://tauri.localhost
This commit is contained in:
@@ -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 平台配置 ===
|
||||
|
||||
|
||||
@@ -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="允许的跨域来源(逗号分隔)",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user