root(minor): fallback to empty string if no Host header ise set

This commit is contained in:
Jens Langhammer 2019-11-01 12:50:38 +00:00
parent e862b97005
commit 0b9fc9e444

View file

@ -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)