fix: add CORS middleware for admin console origin on default tenant
The admin console (port 3002) calls the Management API on the default tenant (port 443). Add Traefik CORS headers to allow cross-origin requests from the admin console origin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,11 @@ services:
|
|||||||
- traefik.http.routers.logto.priority=1
|
- traefik.http.routers.logto.priority=1
|
||||||
- traefik.http.routers.logto.entrypoints=websecure
|
- traefik.http.routers.logto.entrypoints=websecure
|
||||||
- traefik.http.routers.logto.tls=true
|
- traefik.http.routers.logto.tls=true
|
||||||
|
- traefik.http.routers.logto.middlewares=logto-cors
|
||||||
|
- traefik.http.middlewares.logto-cors.headers.accessControlAllowOriginList=${PUBLIC_PROTOCOL:-https}://${PUBLIC_HOST:-localhost}:3002
|
||||||
|
- traefik.http.middlewares.logto-cors.headers.accessControlAllowMethods=GET,POST,PUT,PATCH,DELETE,OPTIONS
|
||||||
|
- traefik.http.middlewares.logto-cors.headers.accessControlAllowHeaders=Authorization,Content-Type
|
||||||
|
- traefik.http.middlewares.logto-cors.headers.accessControlAllowCredentials=true
|
||||||
- traefik.http.services.logto.loadbalancer.server.port=3001
|
- traefik.http.services.logto.loadbalancer.server.port=3001
|
||||||
- traefik.http.routers.logto-console.rule=PathPrefix(`/`)
|
- traefik.http.routers.logto-console.rule=PathPrefix(`/`)
|
||||||
- traefik.http.routers.logto-console.entrypoints=admin-console
|
- traefik.http.routers.logto-console.entrypoints=admin-console
|
||||||
|
|||||||
Reference in New Issue
Block a user