diff --git a/.env.example b/.env.example index 141e77a4..eddc5421 100644 --- a/.env.example +++ b/.env.example @@ -53,6 +53,10 @@ DEBUG=false # Generate with: openssl rand -base64 32 # AUTH_SECRET=your-secure-random-secret-here +# Trusted origins for authentication (comma-separated) +# Add your server's external URL when accessing remotely +# AUTH_TRUSTED_ORIGINS=http://localhost:5003,http://192.168.1.244:5003 + # Admin Account (optional - for pre-configured single-user mode) # When set, admin user is created on first startup and self-registration is disabled # ADMIN_EMAIL=admin@example.com @@ -62,6 +66,10 @@ DEBUG=false # Remove after resetting password # ADMIN_PASSWORD_RESET=false +# Secure Cookies (set to false when running HTTP without a reverse proxy) +# Defaults to true in production, false in development +# AUTH_SECURE_COOKIES=true + # OAuth Providers (optional - enable by providing client ID and secret) # GITHUB_CLIENT_ID= # GITHUB_CLIENT_SECRET= diff --git a/docker-compose.yml b/docker-compose.yml index 7d9b17ae..c7050d3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,7 @@ services: - MAX_UPLOAD_SIZE_MB=50 - DEBUG=false - AUTH_SECRET=${AUTH_SECRET} + - AUTH_TRUSTED_ORIGINS=${AUTH_TRUSTED_ORIGINS:-http://localhost:5003} - ADMIN_EMAIL=${ADMIN_EMAIL:-} - ADMIN_PASSWORD=${ADMIN_PASSWORD:-} - ADMIN_PASSWORD_RESET=${ADMIN_PASSWORD_RESET:-false} @@ -34,6 +35,7 @@ services: - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-} - DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID:-} - DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET:-} + - AUTH_SECURE_COOKIES=${AUTH_SECURE_COOKIES:-false} - PASSKEY_RP_ID=${PASSKEY_RP_ID:-localhost} - PASSKEY_RP_NAME=${PASSKEY_RP_NAME:-OpenCode Manager} - PASSKEY_ORIGIN=${PASSKEY_ORIGIN:-http://localhost:5003}