初次优化认证

This commit is contained in:
sijinhui
2024-03-30 22:41:41 +08:00
parent 3368e88d16
commit 20b35078f0
5 changed files with 37 additions and 45 deletions

View File

@@ -8,10 +8,8 @@ import {
} from "@/app/constant";
import { prettyObject } from "@/app/utils/format";
import { NextRequest, NextResponse } from "next/server";
import { auth, getIP } from "../../auth";
import { getToken } from "next-auth/jwt";
import { auth } from "../../auth";
import { requestLog, requestOpenai } from "../../common";
import { headers } from "next/headers";
const ALLOWD_PATH = new Set(Object.values({ ...OpenaiPath, ...AZURE_PATH }));
@@ -113,7 +111,7 @@ async function handle(
export const GET = handle;
export const POST = handle;
export const runtime = "edge";
// export const runtime = "edge";
export const preferredRegion = [
"arn1",
"bom1",