mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
fix: use getattr for allowed_origins backward compat
Older Docker images may not have the allowed_origins field in Settings. Use getattr with empty list default for graceful fallback.
This commit is contained in:
@@ -98,7 +98,7 @@ if settings.frontend_url:
|
||||
if origin not in production_origins:
|
||||
production_origins.append(origin)
|
||||
# Add extra origins from ALLOWED_ORIGINS env var
|
||||
for extra in settings.allowed_origins:
|
||||
for extra in getattr(settings, "allowed_origins", []):
|
||||
origin = extra.strip().rstrip("/")
|
||||
if origin and origin not in production_origins:
|
||||
production_origins.append(origin)
|
||||
|
||||
Reference in New Issue
Block a user