mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Handle additional HTTP redirect status code 308 in scheduled chat requests (#1088)
Closes #1067
This commit is contained in:
@@ -1913,7 +1913,7 @@ def scheduled_chat(
|
||||
raw_response = requests.post(url, headers=headers, json=json_payload, allow_redirects=False)
|
||||
|
||||
# Handle redirect manually if necessary
|
||||
if raw_response.status_code in [301, 302]:
|
||||
if raw_response.status_code in [301, 302, 308]:
|
||||
redirect_url = raw_response.headers["Location"]
|
||||
logger.info(f"Redirecting to {redirect_url}")
|
||||
raw_response = requests.post(redirect_url, headers=headers, json=json_payload)
|
||||
|
||||
Reference in New Issue
Block a user