Skip to content

Commit 9c5403f

Browse files
committed
v1.8.9-beta4 fix bugs
1 parent 62a1838 commit 9c5403f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gateway/reverseProxy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,12 @@ async def chatgpt_reverse_proxy(request: Request, path: str):
274274
logger.info(f"Request proxy: {proxy_url}")
275275
logger.info(f"Request UA: {user_agent}")
276276
logger.info(f"Request impersonate: {impersonate}")
277-
conv_key = r.cookies.get("conv_key", "")
277+
278278
response = StreamingResponse(content_generator(r, token, history), media_type=r.headers.get("content-type", ""),
279279
background=background)
280-
response.set_cookie("conv_key", value=conv_key)
280+
conv_key = r.cookies.get("conv_key", "")
281+
if conv_key:
282+
response.set_cookie("conv_key", value=conv_key)
281283
return response
282284
elif 'image' in r.headers.get("content-type", "") or "audio" in r.headers.get("content-type", "") or "video" in r.headers.get("content-type", ""):
283285
rheaders = dict(r.headers)

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.9-beta3
1+
1.8.9-beta4

0 commit comments

Comments
 (0)