From 04f18d457d6f24a64b3a4c61ed01cd69d26617b2 Mon Sep 17 00:00:00 2001 From: antkss <88892713+antkss@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:44:41 +0700 Subject: [PATCH] fix response 403 --- WebChatGPT/utils.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/WebChatGPT/utils.py b/WebChatGPT/utils.py index a8ad12a..3fd3b63 100644 --- a/WebChatGPT/utils.py +++ b/WebChatGPT/utils.py @@ -13,21 +13,9 @@ headers = request_headers = { - "Accept": "text/event-stream", - "Accept-Encoding": "gzip, deflate", - "Accept-Language": "en-US,en;q=0.5", - # "Alt-Used": "chat.openai.com", "Authorization": f"Bearer %(value)s", - "Connection": "keep-alive", - "Content-Type": "application/json", - "Host": "chat.openai.com", - "Origin": "https://chat.openai.com", - "Referer": "https://chat.openai.com/", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-origin", - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0", - "OAI-Language": locale.getlocale()[0].replace("_", "-"), + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", + 'Accept': 'application/json, text/plain, */*' } response_example = {