MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / requiresAuth

Function requiresAuth

src/middleware.ts:13–16  ·  view source on GitHub ↗
(pathname: string, method: string)

Source from the content-addressed store, hash-verified

11};
12
13function requiresAuth(pathname: string, method: string): boolean {
14 const methods = ADMIN_ROUTES[pathname];
15 return !!methods && methods.has(method);
16}
17
18function isAuthorized(req: NextRequest): boolean {
19 if (!ADMIN_KEY) return false;

Callers 1

middlewareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected