small
This commit is contained in:
10
gunicorn.conf.py
Normal file
10
gunicorn.conf.py
Normal file
@@ -0,0 +1,10 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user