From c51bc28d6732cfd9ff40b46c0460dfca1154e073 Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Tue, 2 Dec 2025 12:35:23 +0000 Subject: [PATCH] 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 --- .env | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.env b/.env index 6aa4a49..7344d76 100644 --- a/.env +++ b/.env @@ -4,6 +4,7 @@ DATABASE_URL="mysql://lists_app:ListsApp@2025!@192.168.4.20:3306/ultimate_lists" NEXTAUTH_URL=http://localhost:3500 NEXTAUTH_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) DB_HOST=192.168.4.20 diff --git a/docker-compose.yml b/docker-compose.yml index 9b8e255..ab8cad7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3500} - NEXTAUTH_SECRET=${NEXTAUTH_SECRET} - AUTH_SECRET=${AUTH_SECRET} + - AUTH_TRUST_HOST=true restart: unless-stopped depends_on: - db-check