From 164e898b0ba099e343054410dddc94121e7cc131 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:48:35 -0800 Subject: [PATCH] Update to use client-provided public IP address when available (#12) Co-authored-by: Daniel McKnight --- neon_hana/app/routers/assist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neon_hana/app/routers/assist.py b/neon_hana/app/routers/assist.py index 1ca560d..52d88f0 100644 --- a/neon_hana/app/routers/assist.py +++ b/neon_hana/app/routers/assist.py @@ -46,5 +46,6 @@ async def get_tts(request: TTSRequest) -> TTSResponse: @assist_route.post("/get_response") async def get_response(skill_request: SkillRequest, request: Request) -> SkillResponse: - skill_request.node_data.networking.public_ip = request.client.host + if not skill_request.node_data.networking.public_ip: + skill_request.node_data.networking.public_ip = request.client.host return mq_connector.get_response(**dict(skill_request))