mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
merge upstream
This commit is contained in:
parent
a83d79a9f4
commit
9d306118b3
@ -80,7 +80,7 @@ export function auth(
|
||||
break;
|
||||
case ModelProvider.GPT:
|
||||
default:
|
||||
if (serverConfig.isAzure) {
|
||||
if (isAzure) {
|
||||
systemApiKey = serverConfig.azureApiKey;
|
||||
} else {
|
||||
systemApiKey = serverConfig.apiKey;
|
||||
|
@ -18,7 +18,7 @@ export default async function middleware(req: NextRequest) {
|
||||
const session = await getToken({ req });
|
||||
const isUser = await VerifiedUser(session);
|
||||
const isAdminUser = await VerifiedAdminUser(session);
|
||||
console.log('----session', session, '---isUser', isUser, '---isAdmin', isAdminUser)
|
||||
// console.log('----session', session, '---isUser', isUser, '---isAdmin', isAdminUser)
|
||||
// 管理员页面的api接口还是要认证的
|
||||
if (path.startsWith('/api/admin/')) {
|
||||
// 需要确认是管理员
|
||||
|
Loading…
Reference in New Issue
Block a user