From 1ed76560e7514d359abbe3b1a94fe7789e116584 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Sun, 1 Aug 2021 11:15:28 +0200 Subject: [PATCH] Added client-ip and port to the headers of the process request to the server --- jarvis/utils/server_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jarvis/utils/server_utils.py b/jarvis/utils/server_utils.py index 1ea3a8e..988c391 100644 --- a/jarvis/utils/server_utils.py +++ b/jarvis/utils/server_utils.py @@ -15,6 +15,8 @@ def send_record_to_server(raw_audio_data): headers = CaseInsensitiveDict() headers["Content-Type"] = "text/xml; charset=utf8" + headers['Client-Ip'] = socket.gethostname() + headers['Client-Port'] = str(config_utils.get_in_config('PORT')) # headers["Authorization"] = config_utils.get_in_config("API_KEY") response = requests.post(url_service,