支持br和zstd
This commit is contained in:
parent
5db9a064ca
commit
55d0ebad03
|
|
@ -46,3 +46,6 @@ pyyaml
|
|||
croniter
|
||||
bcrypt
|
||||
packaging
|
||||
Flask-Compress
|
||||
brotli
|
||||
zstd
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ from flask import Response
|
|||
from flask import Flask, abort, current_app, session, url_for
|
||||
from flask import Blueprint, render_template
|
||||
from flask import render_template_string
|
||||
from flask_compress import Compress
|
||||
|
||||
from flask_socketio import SocketIO, emit, send
|
||||
|
||||
|
|
@ -44,6 +45,9 @@ setup.init()
|
|||
|
||||
app = Flask(__name__, template_folder='templates/default')
|
||||
|
||||
app.config["COMPRESS_ALGORITHM"] = ["zstd", "br", "gzip"]
|
||||
Compress(app)
|
||||
|
||||
# 缓存配置
|
||||
cache = Cache(config={'CACHE_TYPE': 'simple'})
|
||||
cache.init_app(app, config={'CACHE_TYPE': 'simple'})
|
||||
|
|
|
|||
Loading…
Reference in New Issue