From 0b9fc9e4441dd8079d07708958256d5430e57cc3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 1 Nov 2019 12:50:38 +0000 Subject: [PATCH] root(minor): fallback to empty string if no Host header ise set --- passbook/root/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passbook/root/wsgi.py b/passbook/root/wsgi.py index 848d8975f..f9ce13c41 100644 --- a/passbook/root/wsgi.py +++ b/passbook/root/wsgi.py @@ -30,7 +30,7 @@ class WSGILogger: status_codes = [] content_lengths = [] - if environ.get('HTTP_HOST').startswith('kubernetes-healthcheck-host'): + if environ.get('HTTP_HOST', '').startswith('kubernetes-healthcheck-host'): # Don't log kubernetes health/readiness requests return self.__healthcheck(start_response)