fix: move Logto to auth.localhost subdomain to avoid /assets path conflict
All checks were successful
CI / build (push) Successful in 39s
CI / docker (push) Successful in 38s

Logto's login page references /assets/* which conflicts with the SPA's
assets at the same path. Using Host-based routing (auth.localhost) gives
Logto its own namespace - all paths on that subdomain go to Logto,
eliminating the conflict. *.localhost resolves to 127.0.0.1 and is a
secure context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-05 17:42:17 +02:00
parent c58ca34b2c
commit 0472528cd6
3 changed files with 12 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ export async function fetchConfig(): Promise<AppConfig> {
// Fallback to env vars (Vite dev mode)
cached = {
logtoEndpoint: import.meta.env.VITE_LOGTO_ENDPOINT || `http://${window.location.hostname}`,
logtoEndpoint: import.meta.env.VITE_LOGTO_ENDPOINT || `http://auth.${window.location.hostname}`,
logtoClientId: import.meta.env.VITE_LOGTO_CLIENT_ID || '',
logtoResource: import.meta.env.VITE_LOGTO_RESOURCE || '',
scopes: [