Build [v1.9.18]

This commit is contained in:
Daniel Bedeleanu
2026-04-13 23:43:52 +03:00
parent 1fff658d3c
commit fcb187974e
13 changed files with 222 additions and 113 deletions

View File

@@ -51,6 +51,20 @@ if server_ip and server_ip != "localhost":
if ip_o not in ALLOWED_ORIGINS:
ALLOWED_ORIGINS.append(ip_o)
# [NEW] Add Extra Allowed Origins (Tailscale, VPN, etc.)
extra_origins_raw = os.environ.get("EXTRA_ALLOWED_ORIGINS", "")
if extra_origins_raw:
for extra_ip in [o.strip() for o in extra_origins_raw.split(",") if o.strip()]:
# Generate standard combinations for this extra origin
ext_combos = [
f"http://{extra_ip}:{front_port}",
f"https://{extra_ip}:{front_ssl_port}",
f"https://{extra_ip}:{back_ssl_port}",
]
for combo in ext_combos:
if combo not in ALLOWED_ORIGINS:
ALLOWED_ORIGINS.append(combo)
log.info(f"CORS allowed origins: {ALLOWED_ORIGINS}")
# Add CORS middleware FIRST (before rate limiter)