2
0
mirror of https://github.com/codl/forget synced 2024-12-26 07:04:59 +01:00

add proxyfix

This commit is contained in:
codl 2020-11-18 01:23:58 +01:00
parent 48b9ec7796
commit ed9146231e

3
app.py
View File

@ -7,6 +7,7 @@ from libforget.cachebust import cachebust
import mimetypes import mimetypes
import libforget.brotli import libforget.brotli
import libforget.img_proxy import libforget.img_proxy
from werkzeug.middleware.proxy_fix import ProxyFix
app = Flask(__name__) app = Flask(__name__)
@ -94,3 +95,5 @@ libforget.brotli.brotli(app)
imgproxy = ( imgproxy = (
libforget.img_proxy.ImgProxyCache(redis_uri=app.config.get('REDIS_URI'))) libforget.img_proxy.ImgProxyCache(redis_uri=app.config.get('REDIS_URI')))
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)