fix(config): require PLATFORM_URL explicitly, no hardcoded domain default
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
The previous fix defaulted PLATFORM_URL to this deployment's own domain directly in docker-compose.prod.yml — any other deployment of this repo would silently inherit it if they forgot to set their own. Now there is no default at all: the compose file requires the env var to be set, and the backend refuses to start in production if PLATFORM_URL still equals the dev value, mirroring the existing SECRET_KEY enforcement.
This commit is contained in:
@@ -91,8 +91,9 @@ services:
|
||||
REDIS_CACHE_DB: ${REDIS_CACHE_DB:-2}
|
||||
CORS_ORIGINS: ${CORS_ORIGINS:-}
|
||||
# Base URL used to build links in outbound emails (set-password, etc).
|
||||
# Must be the real public frontend URL, not the dev default.
|
||||
PLATFORM_URL: ${PLATFORM_URL:-http://aegis.undiamagico.es}
|
||||
# No default on purpose — every deployment has a different domain;
|
||||
# the backend refuses to start in production without this set.
|
||||
PLATFORM_URL: ${PLATFORM_URL:?Set PLATFORM_URL in your .env file to this deployment's real public frontend URL}
|
||||
AEGIS_ENV: ${AEGIS_ENV:-production}
|
||||
SECURE_COOKIES: ${SECURE_COOKIES:-false}
|
||||
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
||||
|
||||
Reference in New Issue
Block a user