MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / isAuthenticated

Function isAuthenticated

src/middleware.ts:10–13  ·  view source on GitHub ↗
(request: NextRequest)

Source from the content-addressed store, hash-verified

8const PUBLIC_API_PREFIXES = ["/api/auth/", "/api/health"];
9
10function isAuthenticated(request: NextRequest): boolean {
11 const authCookie = request.cookies.get("mc_auth");
12 return !!(authCookie && authCookie.value === process.env.AUTH_SECRET);
13}
14
15export function middleware(request: NextRequest) {
16 const { pathname } = request.nextUrl;

Callers 1

middlewareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected