diff --git a/packages/gitbook/src/middleware.ts b/packages/gitbook/src/middleware.ts index 6ef3064cf..9a0ad3eda 100644 --- a/packages/gitbook/src/middleware.ts +++ b/packages/gitbook/src/middleware.ts @@ -269,7 +269,7 @@ export async function middleware(request: NextRequest) { // When the request is authenticated, we don't want to cache the response on the server. // Allow storing so that revalidation still happens with server. - if (!resolved.visitorToken) { + if (resolved.visitorToken) { return 'no-cache, no-store'; }