fix: bypass auth in dev mode and add mock session for development

Add DEV_MODE env var check to return mock admin session when auth is
unavailable, hostname-based middleware bypass for dev domain, and
window.location.href for login redirect to ensure cookies are sent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lorentz 2026-02-16 15:18:48 +00:00
parent b389d8b482
commit 3cd5b05c46
2 changed files with 20 additions and 4 deletions

View file

@ -68,6 +68,8 @@ services:
image: forgejo.wulfconsulting.cloud/lorentz/quest-vorteq:dev
container_name: vorteq-dev
restart: unless-stopped
extra_hosts:
- "wi-e10test:10.77.0.217"
networks:
- web
environment:
@ -77,6 +79,12 @@ services:
REDIS_URL: redis://redis:6379/0
BETTER_AUTH_SECRET: ${DEV_AUTH_SECRET}
BETTER_AUTH_URL: https://${DEV_DOMAIN}
MSSQL_HOST: ${DB_HOST}
MSSQL_DATABASE: Epicor10Live
MSSQL_USER: ${DB_USERNAME_RO}
MSSQL_PASSWORD: ${DB_PASSWORD_RO}
MSSQL_PORT: "1433"
PORTAL_DB_NAME: ${DB_DATABASE}
PORT: 3000
labels:
- "traefik.enable=true"