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