MCPcopy Create free account
hub / github.com/code100x/cms / middleware

Function middleware

src/middleware.ts:78–84  ·  view source on GitHub ↗
(req: NextRequestWithAuth)

Source from the content-addressed store, hash-verified

76};
77
78export async function middleware(req: NextRequestWithAuth) {
79 const { pathname } = req.nextUrl;
80 if (pathname.startsWith('/api/mobile')) {
81 return withMobileAuth(req);
82 }
83 return await withAuth(req);
84}
85
86export default withAuth;

Callers

nothing calls this directly

Calls 2

withMobileAuthFunction · 0.85
withAuthFunction · 0.85

Tested by

no test coverage detected