mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-11 20:43:42 +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