Add AUTH_TRUST_HOST environment variable for Docker

- Set AUTH_TRUST_HOST=true in .env and docker-compose.yml
- Ensures NextAuth trusts all hosts in Docker environment
- Fixes UntrustedHost error
This commit is contained in:
2025-12-02 12:35:23 +00:00
parent f1cbd88761
commit c51bc28d67
2 changed files with 2 additions and 0 deletions

1
.env
View File

@@ -4,6 +4,7 @@ DATABASE_URL="mysql://lists_app:ListsApp@2025!@192.168.4.20:3306/ultimate_lists"
NEXTAUTH_URL=http://localhost:3500 NEXTAUTH_URL=http://localhost:3500
NEXTAUTH_SECRET=your-secret-key-here-please-change-in-production NEXTAUTH_SECRET=your-secret-key-here-please-change-in-production
AUTH_SECRET=your-secret-key-here-please-change-in-production AUTH_SECRET=your-secret-key-here-please-change-in-production
AUTH_TRUST_HOST=true
# Database connection check (for docker-compose health check) # Database connection check (for docker-compose health check)
DB_HOST=192.168.4.20 DB_HOST=192.168.4.20

View File

@@ -11,6 +11,7 @@ services:
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3500} - NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3500}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET} - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- AUTH_SECRET=${AUTH_SECRET} - AUTH_SECRET=${AUTH_SECRET}
- AUTH_TRUST_HOST=true
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- db-check - db-check