From e59300da4b464dd32791262aa26d8acc614dac61 Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 8 Oct 2026 05:28:23 -0400 Subject: [PATCH] fix(middleware): exclude /auth.md from markdown content rewrite --- apps/site/src/middleware.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/site/src/middleware.ts b/apps/site/src/middleware.ts index 6cf01d6ff..c4cd80031 100644 --- a/apps/site/src/middleware.ts +++ b/apps/site/src/middleware.ts @@ -33,8 +33,10 @@ export const onRequest = defineMiddleware(async (context, next) => { const origin = context.locals.siteUrl.origin; const pathname = context.url.pathname; + const isDedicatedMarkdownEndpoint = pathname === "/auth.md"; const isMarkdownUrl = - pathname.endsWith(".md") || pathname.endsWith("/index.md"); + !isDedicatedMarkdownEndpoint && + (pathname.endsWith(".md") || pathname.endsWith("/index.md")); const acceptMarkdown = context.request.headers .get("Accept") ?.includes("text/markdown");