fix: [HOTFIX] 确保生产CORS始终包含saas.xiaoxiajianji.com #93
Reference in New Issue
Block a user
Delete Branch "fix/cors-production-domains"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
v0.1.75的CORS修复只在CORS_ORIGINS为空时才添加默认域名,但生产环境通过
CORS_ORIGINS_RAW环境变量设置了特定的域名列表,导致saas.xiaoxiajianji.com仍然不在CORS允许列表中。修复
无论
CORS_ORIGINS_RAW如何配置,在非DEBUG模式下都确保包含xiaoxiajianji.com和saas.xiaoxiajianji.com两个生产域名。变更
apps/api/main.py: CORS配置逻辑改为"始终追加"而非"仅默认"紧急合并到main以修复生产环境CORS问题。