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