diff --git a/gateway/reverseProxy.py b/gateway/reverseProxy.py index 962482d..259ba88 100644 --- a/gateway/reverseProxy.py +++ b/gateway/reverseProxy.py @@ -163,7 +163,11 @@ async def chatgpt_reverse_proxy(request: Request, path: str): background = BackgroundTask(client.close) r = await client.request(request.method, f"{base_url}/{path}", params=params, headers=headers, cookies=request_cookies, data=data, stream=True, allow_redirects=False) - + if r.status_code == 307: + if "bing" in path: + return Response(status_code=307, + headers={"Location": r.headers.get("Location").replace("chatgpt.com", origin_host) + .replace("https", petrol)}, background=background) if r.status_code == 302: return Response(status_code=302, headers={"Location": r.headers.get("Location").replace("chatgpt.com", origin_host) diff --git a/version.txt b/version.txt index 49ebdd6..e0ed9d7 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.6.5 \ No newline at end of file +1.6.6-beta1 \ No newline at end of file