diff --git a/multiplexer.py b/multiplexer.py index 03f363f..111539c 100644 --- a/multiplexer.py +++ b/multiplexer.py @@ -49,10 +49,10 @@ def ingest_request(): response1 = requests.post( f"{REITTI_BASE_URL}/api/v1/ingest/owntracks", json=data, - headers=request.headers, + headers={'Content-Type': 'application/json'}, params={'token': REITTI_API_KEY} ) - app.logger.info(f'Forwarded point to Reitti: {response1.status_code}') + app.logger.info(f'Forwarded point to Reitti: {response1.status_code} - Body: {response1.content}') except Exception as e: app.logger.error(f'Error forwarding request to Reitti: {str(e)}') @@ -65,10 +65,10 @@ def ingest_request(): response2 = requests.post( f"{DAWARICH_BASE_URL}/api/v1/owntracks/points", json=data, - headers=request.headers, + headers={'Content-Type': 'application/json'}, params={'api_key': DAWARICH_API_KEY} ) - app.logger.info(f'Forwarded point to Dawarich: {response2.status_code}') + app.logger.info(f'Forwarded point to Dawarich: {response2.status_code} - Body: {response2.content}') except Exception as e: app.logger.error(f'Error forwarding request to Dawarich: {str(e)}')