Serve the CMS admin panel under /admin on the public domain
Replace the separate CMS subdomain with path-based routing in Caddy: /admin and /uploads go to Strapi, everything else to the frontend. Strapi 5 nests its whole admin panel (UI and API) under /admin, so this one prefix is enough and never collides with the frontend's own /api routes. Drops CMS_DOMAIN and the unused STRAPI_URL env var on the cms service; PUBLIC_STRAPI_URL now points at the same origin as the site. Authentication is unchanged: Strapi's own admin login still gates the panel, this only changes how it's reached.
This commit is contained in:
@@ -36,7 +36,6 @@ services:
|
||||
TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
||||
STRAPI_URL: https://${CMS_DOMAIN}
|
||||
volumes:
|
||||
- cms-uploads:/app/public/uploads
|
||||
|
||||
@@ -71,7 +70,6 @@ services:
|
||||
- 8.8.8.8
|
||||
environment:
|
||||
PUBLIC_DOMAIN: ${PUBLIC_DOMAIN}
|
||||
CMS_DOMAIN: ${CMS_DOMAIN}
|
||||
ACME_EMAIL: ${ACME_EMAIL}
|
||||
volumes:
|
||||
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
|
||||
Reference in New Issue
Block a user