diff --git a/app.py b/app.py index 4d1a79a..dc7221a 100644 --- a/app.py +++ b/app.py @@ -20,11 +20,14 @@ import atexit from flask_limiter import Limiter from flask_limiter.util import get_remote_address import secrets +from werkzeug.middleware.proxy_fix import ProxyFix app = Flask(__name__) app.secret_key = os.urandom(24) config = load_or_create_config() +app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1) + UPLOAD_FOLDER = config['directories']['upload'] THUMBNAIL_FOLDER = config['directories']['thumbnail'] ALLOWED_EXTENSIONS = {'jpg', 'jpeg', 'png', 'gif'}