mirror of
https://github.com/beilunyang/moemail.git
synced 2026-07-06 23:01:39 +08:00
feat: /api/config endpoint can be called using APIKey
This commit is contained in:
@@ -25,7 +25,7 @@ async function getUserByApiKey(key: string): Promise<User | null> {
|
||||
}
|
||||
|
||||
export async function handleApiKeyAuth(apiKey: string, pathname: string) {
|
||||
if (!pathname.startsWith('/api/emails')) {
|
||||
if (!pathname.startsWith('/api/emails') && !pathname.startsWith('/api/config')) {
|
||||
return NextResponse.json(
|
||||
{ error: "无权限查看" },
|
||||
{ status: 403 }
|
||||
|
||||
Reference in New Issue
Block a user