improve: cache tool icons by setting max-age HTTP header and enable gzip compression SVG icons from backend (#2971)
This commit is contained in:
parent
58e4702b14
commit
1f98a4fff3
3 changed files with 12 additions and 3 deletions
|
|
@ -5,6 +5,12 @@ def init_app(app: Flask):
|
|||
if app.config.get('API_COMPRESSION_ENABLED', False):
|
||||
from flask_compress import Compress
|
||||
|
||||
app.config['COMPRESS_MIMETYPES'] = [
|
||||
'application/json',
|
||||
'image/svg+xml',
|
||||
'text/html',
|
||||
]
|
||||
|
||||
compress = Compress()
|
||||
compress.init_app(app)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue