cleaup env

This commit is contained in:
2025-09-17 09:52:47 +02:00
parent be3a9002b3
commit 2912b99aa1
10 changed files with 105 additions and 38 deletions

View File

@@ -48,7 +48,8 @@ class Settings(BaseSettings):
"""Derive CORS origins from BASE_URL if not explicitly set"""
if v is None:
base_url = info.data.get('BASE_URL', 'localhost')
return [f"http://{base_url}"]
# Support both HTTP and HTTPS for production environments
return [f"http://{base_url}", f"https://{base_url}"]
return v if isinstance(v, list) else [v]
# CORS origins (derived from BASE_URL)