mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 22:12:33 +08:00
fixup: disable access control when CODE is empty
This commit is contained in:
@@ -14,7 +14,7 @@ export function middleware(req: NextRequest, res: NextResponse) {
|
||||
console.log("[Auth] got access code:", accessCode);
|
||||
console.log("[Auth] hashed access code:", hashedCode);
|
||||
|
||||
if (!ACCESS_CODES.has(hashedCode)) {
|
||||
if (ACCESS_CODES.size > 0 && !ACCESS_CODES.has(hashedCode)) {
|
||||
return NextResponse.json(
|
||||
{
|
||||
needAccessCode: true,
|
||||
|
Reference in New Issue
Block a user