We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f77791 commit 32fc3d1Copy full SHA for 32fc3d1
landmarkerio/server.py
@@ -19,7 +19,10 @@ def safe_send(x, fail_message):
19
20
async def safe_send_file(mimetype, path, fail_message, gzip=False):
21
try:
22
- return await response.file(path, mime_type=mimetype)
+ headers = None
23
+ if gzip:
24
+ headers = {"Content-Encoding": "gzip"}
25
+ return await response.file(path, mime_type=mimetype, headers=headers)
26
except Exception as e:
27
print(e)
28
return abort(404, message=fail_message)
0 commit comments