Files
aio_html_generator/gunicorn.conf.py
Mateusz Gruszczyński 13734e585b small
2026-02-26 15:15:46 +01:00

11 lines
344 B
Python

from gunicorn.http import wsgi
from functools import wraps
def wrap_default_headers(func):
@wraps(func)
def default_headers(*args, **kwargs):
return [h for h in func(*args, **kwargs) if not h.startswith('Server:')]
return default_headers
wsgi.Response.default_headers = wrap_default_headers(wsgi.Response.default_headers)