-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration and Environments
stdOWL edited this page Jun 22, 2026
·
1 revision
Configuration is environment-overridable, and a Spring profile (SPRING_PROFILES_ACTIVE) selects per-environment behavior. The same image runs every environment — the profile is chosen at deploy time.
| Profile | Rate-limit backend | Forwarded headers |
|---|---|---|
local (default) |
in-memory | off |
dev, qa, sandbox, prod
|
Redis |
framework (honors X-Forwarded-*) |
Base config is application.yaml; per-environment overrides are application-{dev,qa,sandbox,prod}.yaml.
| Variable | Purpose | Default |
|---|---|---|
JWT_SECRET |
HS256 signing key, ≥ 32 bytes (required; app fails fast otherwise) | dev/test injected |
SPRING_PROFILES_ACTIVE |
active profile | local |
RATELIMIT_ENABLED |
toggle rate limiting | true |
RATELIMIT_BACKEND |
memory or redis
|
per profile |
RATELIMIT_TRUST_XFF |
trust X-Forwarded-For for the client IP |
false |
REDIS_HOST / REDIS_PORT
|
Redis location (Redis profiles) |
localhost / 6379
|
CORS_ALLOWED_ORIGINS |
comma-separated allowed browser origins | http://localhost:5173 |
-
Forwarded headers are enabled only in deployed profiles so generated URLs (e.g. the OpenAPI server URL) use the external
httpshost behind the TLS-terminating proxy. It's off inlocal/tests so it doesn't stripX-Forwarded-Forbefore the rate limiter — see Troubleshooting. -
CORS is only needed for cross-origin callers (e.g. the local SPA at
:5173). The deployed SPA is same-origin, but its own origin is still added to the allow-list because ES module scripts are fetched in CORS mode. -
Branches
dev/qa/sandbox/prodtrack the deployment environments (same code; the profile picks the behavior).
Getting started
How it works
Operations
Reference