fix: move Logto to auth.localhost subdomain to avoid /assets path conflict
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:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user