From ce174f34d87c846d2434583c8e2e73a715a417fc Mon Sep 17 00:00:00 2001 From: Flynn Date: Tue, 2 May 2023 16:15:50 -0400 Subject: [PATCH] Don't smash the pod ID when the GUI is serving as an ingress Signed-off-by: Flynn --- src/faces-service/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/faces-service/server.py b/src/faces-service/server.py index e547126..efa311a 100755 --- a/src/faces-service/server.py +++ b/src/faces-service/server.py @@ -638,6 +638,10 @@ def do_GET(self): rcode = response.status_code rtext = response.text rtype = response.headers.get("content-type") + + # If we're forwarding a request to the face service, we want + # to forward its pod ID back to the client. + pod_id = response.headers.get("x-faces-pod", pod_id) except requests.RequestException as e: rcode = 500 rtext = str(e)