Add globals REQUEST_TYPES, RESPONSE_TYPES.
This commit is contained in:
parent
68d12e4900
commit
45da148493
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
import flask
|
||||
import gzip
|
||||
import io
|
||||
import werkzeug.wrappers
|
||||
|
||||
from voussoirkit import bytestring
|
||||
|
||||
|
@ -7,6 +9,9 @@ GZIP_MINIMUM_SIZE = 500 * bytestring.BYTE
|
|||
GZIP_MAXIMUM_SIZE = 5 * bytestring.MIBIBYTE
|
||||
GZIP_LEVEL = 3
|
||||
|
||||
REQUEST_TYPES = (flask.Request, werkzeug.wrappers.Request, werkzeug.local.LocalProxy)
|
||||
RESPONSE_TYPES = (flask.Response, werkzeug.wrappers.Response)
|
||||
|
||||
def gzip_response(request, response):
|
||||
if response.direct_passthrough:
|
||||
return response
|
||||
|
|
Loading…
Reference in a new issue