mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 12:27:43 +00:00
chore: add allow docs flag
This commit is contained in:
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export default function middleware(req: NextRequest) {
|
||||
if (
|
||||
req.nextUrl.pathname.startsWith("/docs") &&
|
||||
req.nextUrl.pathname.startsWith("/docs") && !req.nextUrl.searchParams.has("allow_docs") &&
|
||||
process.env.NODE_ENV === "production"
|
||||
) {
|
||||
return NextResponse.redirect(new URL("/", req.url));
|
||||
|
||||
Reference in New Issue
Block a user