mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-08 14:12:27 -05:00
fix werkzeug server header
This commit is contained in:
@@ -81,21 +81,6 @@ class ResponseHeaderMiddleware(object):
|
||||
for key, value in headers
|
||||
if key.lower() not in ["server", "last-modified"]
|
||||
]
|
||||
found_a_text_yaml = False
|
||||
old_headers_len = len(headers)
|
||||
headers = [
|
||||
(key, value)
|
||||
for key, value in headers
|
||||
if "text/yaml" not in value.lower()
|
||||
]
|
||||
new_headers_len = len(headers)
|
||||
if new_headers_len < old_headers_len:
|
||||
found_a_text_yaml = True
|
||||
|
||||
if found_a_text_yaml:
|
||||
headers.append(("Content-Type", "text/plain"))
|
||||
|
||||
print(f"MIDDLEWARE HEADERS {headers}")
|
||||
return start_response(status, headers, exc_info)
|
||||
|
||||
return self._app(environ, rewrite_response_headers)
|
||||
|
||||
@@ -4,4 +4,4 @@ if [[ $CF_INSTANCE_INDEX -eq 0 ]]; then
|
||||
flask db upgrade
|
||||
fi
|
||||
|
||||
exec newrelic-admin run-program gunicorn -c ${HOME}/gunicorn_config.py --no-sendfile application
|
||||
exec newrelic-admin run-program gunicorn -c ${HOME}/gunicorn_config.py application
|
||||
|
||||
Reference in New Issue
Block a user