diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index f2cc7329..6b6ee7a9 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -261,6 +261,8 @@ def duplicate_chat_history_public_conversation( public_conversation_url = PublicConversationAdapters.get_public_conversation_url(public_conversation) + domain = request.headers.get("host") + update_telemetry_state( request=request, telemetry_type="api", @@ -268,9 +270,7 @@ def duplicate_chat_history_public_conversation( **common.__dict__, ) - return Response( - status_code=200, content=json.dumps({"status": "ok", "url": f"{request.client.host}{public_conversation_url}"}) - ) + return Response(status_code=200, content=json.dumps({"status": "ok", "url": f"{domain}{public_conversation_url}"})) @api_chat.get("/sessions")