diff --git a/apps/api/main.py b/apps/api/main.py index e2e209207..22c48bed7 100644 --- a/apps/api/main.py +++ b/apps/api/main.py @@ -39,10 +39,11 @@ if settings.DEBUG: allow_origins = settings.CORS_ORIGINS # Allow localhost in debug mode else: # In production, filter out any wildcard "*" origins - allow_origins = [origin for origin in settings.CORS_ORIGINS if origin != "*"] - if not allow_origins: - # Default to production domains if no valid origins configured - allow_origins = ["https://xiaoxiajianji.com", "https://saas.xiaoxiajianji.com"] + allow_origins = list({origin for origin in settings.CORS_ORIGINS if origin != "*"}) + # Always ensure production domains are included + for domain in ("https://xiaoxiajianji.com", "https://saas.xiaoxiajianji.com"): + if domain not in allow_origins: + allow_origins.append(domain) app.add_middleware( CORSMiddleware, diff --git a/browser/screenshots/screenshot-1782652030176.png b/browser/screenshots/screenshot-1782652030176.png new file mode 100644 index 000000000..667a4f7f4 Binary files /dev/null and b/browser/screenshots/screenshot-1782652030176.png differ diff --git a/browser/screenshots/screenshot-1782652106624.png b/browser/screenshots/screenshot-1782652106624.png new file mode 100644 index 000000000..667a4f7f4 Binary files /dev/null and b/browser/screenshots/screenshot-1782652106624.png differ diff --git a/browser/screenshots/screenshot-1782652191077.png b/browser/screenshots/screenshot-1782652191077.png new file mode 100644 index 000000000..7398ba572 Binary files /dev/null and b/browser/screenshots/screenshot-1782652191077.png differ diff --git a/browser/screenshots/screenshot-1782652205978.png b/browser/screenshots/screenshot-1782652205978.png new file mode 100644 index 000000000..4e7e35dfc Binary files /dev/null and b/browser/screenshots/screenshot-1782652205978.png differ diff --git a/browser/screenshots/screenshot-1782652423904.png b/browser/screenshots/screenshot-1782652423904.png new file mode 100644 index 000000000..0cc0351e7 Binary files /dev/null and b/browser/screenshots/screenshot-1782652423904.png differ