From 54b516ffee5e7f4b16ff3331021c637051655562 Mon Sep 17 00:00:00 2001 From: flym Date: Wed, 9 Sep 2026 19:18:30 +0800 Subject: [PATCH] fix: mount CMS under cms base path --- apps/cms/next.config.mjs | 1 + infra/caddy/Caddyfile | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/cms/next.config.mjs b/apps/cms/next.config.mjs index 8eae5ef..1defe64 100644 --- a/apps/cms/next.config.mjs +++ b/apps/cms/next.config.mjs @@ -2,4 +2,5 @@ import { withPayload } from "@payloadcms/next/withPayload"; export default withPayload({ reactStrictMode: true, + basePath: "/cms", }); diff --git a/infra/caddy/Caddyfile b/infra/caddy/Caddyfile index b340ded..abf8da0 100644 --- a/infra/caddy/Caddyfile +++ b/infra/caddy/Caddyfile @@ -2,10 +2,8 @@ https://192.168.199.22 { tls internal encode gzip - handle_path /cms/* { - reverse_proxy 127.0.0.1:3001 { - header_down Location ^/admin(.*)$ /cms/admin$1 - } + handle /cms/* { + reverse_proxy 127.0.0.1:3001 } handle /api/* {