From b46ec98115557900640362064879db5a71e01209 Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Tue, 5 Nov 2024 17:16:32 -0500 Subject: [PATCH] Reverse Proxy Changes --- app.py | 3 +++ 1 file changed, 3 insertions(+) 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'}