Skip to content

Commit 5797a48

Browse files
committed
fix: Add ALLOWED_HOSTS environment variable for improved host configuration
1 parent e5c1fb9 commit 5797a48

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ SECRET_KEY=GENERATE_WITH_openssl_rand_base64_50
2525
# DNS must resolve to this hostname
2626
SERVICE_HOSTNAME=error-observability.app.example.com
2727

28+
# -- Additional Allowed Hosts (optional) --
29+
# Comma-separated list of additional hostnames for ALLOWED_HOSTS
30+
# Use when running behind a proxy that forwards a different Host header
31+
# Example: ALLOWED_HOSTS=alt-hostname.example.com,another.example.com
32+
#ALLOWED_HOSTS=
33+
2834
# -- Docker Network --
2935
# Unique subnet ID (1-254) to avoid conflicts with other stacks
3036
PRIVATESUBNET=252

docker-compose.development.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ services:
2525
- BASE_URL=https://${SERVICE_HOSTNAME}
2626
- BEHIND_HTTPS_PROXY=true
2727
- SITE_TITLE=${SITE_TITLE:-Bugsink}
28+
- ALLOWED_HOSTS=${SERVICE_HOSTNAME},localhost,127.0.0.1,${ALLOWED_HOSTS:-}
2829

2930
# Database Connection
3031
- DATABASE_URL=postgresql://bugsink:${DATABASE_PASSWORD}@database-server:5432/bugsink

docker-compose.traefik.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ services:
2525
- BASE_URL=https://${SERVICE_HOSTNAME}
2626
- BEHIND_HTTPS_PROXY=true
2727
- SITE_TITLE=${SITE_TITLE:-Bugsink}
28+
- ALLOWED_HOSTS=${SERVICE_HOSTNAME},localhost,127.0.0.1,${ALLOWED_HOSTS:-}
2829

2930
# Database Connection
3031
- DATABASE_URL=postgresql://bugsink:${DATABASE_PASSWORD}@database-server:5432/bugsink

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ services:
2525
- BASE_URL=https://${SERVICE_HOSTNAME}
2626
- BEHIND_HTTPS_PROXY=true
2727
- SITE_TITLE=${SITE_TITLE:-Bugsink}
28+
- ALLOWED_HOSTS=${SERVICE_HOSTNAME},localhost,127.0.0.1,${ALLOWED_HOSTS:-}
2829

2930
# Database Connection
3031
- DATABASE_URL=postgresql://bugsink:${DATABASE_PASSWORD}@database-server:5432/bugsink

0 commit comments

Comments
 (0)