From 4048998fef5e856a4280517918a0dc063d44c10d Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 17 Aug 2021 11:55:01 +0200 Subject: Add ProxyFix middleware --- pastepy/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pastepy/__init__.py b/pastepy/__init__.py index 0cc4db6..a3114e1 100644 --- a/pastepy/__init__.py +++ b/pastepy/__init__.py @@ -1,7 +1,9 @@ from flask import Flask +from werkzeug.middleware.proxy_fix import ProxyFix app = Flask(__name__) app.config.from_pyfile('pastepy.cfg') +app.wsgi_app = ProxyFix(app.wsgi_app) with app.app_context(): from .pastepy import app as pastepy -- cgit v1.2.3