fix minor startup error

This commit is contained in:
Kenneth Kehl
2025-02-03 11:50:32 -08:00
parent 7743bc40c8
commit 0de1dd1fd5

View File

@@ -81,6 +81,16 @@ class ResponseHeaderMiddleware(object):
for key, value in headers
if key.lower() not in ["server", "last-modified"]
]
headers = [
(key, value)
for key, value in headers
if "werkzeug" not in value.lower()
]
for key, value in headers:
if key.lower() == "content-type" and "text/yaml" in value.lower():
headers.pop("Content-Type")
headers.append("Content-Type", "application/yaml")
headers.append(("Server", "SecureServer"))
return start_response(status, headers, exc_info)