Compare commits

...

1 Commits

Author SHA1 Message Date
John Doherty af11d23c7f MCP Auth Middleware Exception 2025-11-04 10:45:35 +00:00
+7
View File
@@ -414,6 +414,13 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
return writeResponseCookies(response, cookies);
};
if (siteRequestURL.pathname.endsWith('/~gitbook/mcp')) {
const token = siteRequestURL.searchParams.get('apiToken');
if (token) {
return withAPIToken(token);
}
}
// For https://preview/<siteURL> requests,
if (siteRequestURL.hostname === 'preview') {
// Do not track page views for preview requests