diff --git a/infrastructure/index.ts b/infrastructure/index.ts index a716e392771b..b6b0adab30ad 100644 --- a/infrastructure/index.ts +++ b/infrastructure/index.ts @@ -739,7 +739,10 @@ if (config.guidesStack) { { ...baseCacheBehavior, targetOriginId: guidesCDN, - pathPattern: "/guides/*", + // "/guides*" (no slash) matches /guides, /guides.md, and + // /guides/... so the bare path reaches the guides origin and gets + // the native trailing-slash redirect, matching registry's behavior. + pathPattern: "/guides*", cachePolicyId: thirtyMinuteCachePolicy.id, originRequestPolicyId: allViewerExceptHostHeaderId, },