mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Merge pull request #3131 from xtekky/copilot/fix-3128
Fix WebUI authentication bypass for /chat/ endpoint
This commit is contained in:
commit
df3c34cd69
1 changed files with 1 additions and 1 deletions
|
|
@ -273,7 +273,7 @@ class Api:
|
|||
if user_g4f_api_key is not None:
|
||||
if user is None:
|
||||
return ErrorResponse.from_message("Invalid G4F API key", HTTP_403_FORBIDDEN)
|
||||
elif path.startswith("/backend-api/") or path.startswith("/chat/") and path != "/chat/":
|
||||
elif path.startswith("/backend-api/") or path.startswith("/chat/"):
|
||||
try:
|
||||
user = await self.get_username(request)
|
||||
except HTTPException as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue