mirror of
https://github.com/beilunyang/moemail.git
synced 2026-07-07 23:31:44 +08:00
feat: Add configurable maximum email limit for users
This commit is contained in:
@@ -32,6 +32,10 @@ export async function middleware(request: Request) {
|
||||
)
|
||||
}
|
||||
|
||||
if (pathname === '/api/config' && request.method === 'GET') {
|
||||
return NextResponse.next()
|
||||
}
|
||||
|
||||
for (const [route, permission] of Object.entries(API_PERMISSIONS)) {
|
||||
if (pathname.startsWith(route)) {
|
||||
const hasAccess = await checkPermission(permission)
|
||||
|
||||
Reference in New Issue
Block a user