Added client-ip and port to the headers of the process request to the server

This commit is contained in:
Mathieu B 2021-08-01 11:15:28 +02:00
parent 0912e5ca17
commit 1ed76560e7

View File

@ -15,6 +15,8 @@ def send_record_to_server(raw_audio_data):
headers = CaseInsensitiveDict() headers = CaseInsensitiveDict()
headers["Content-Type"] = "text/xml; charset=utf8" 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") # headers["Authorization"] = config_utils.get_in_config("API_KEY")
response = requests.post(url_service, response = requests.post(url_service,