From 80cfa3c557da49a680d68dfac442a38affd5bdbe Mon Sep 17 00:00:00 2001 From: Omer Lachish Date: Sun, 9 Feb 2020 15:20:16 +0200 Subject: [PATCH] set correct values for ProxyFix (#4630) --- redash/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redash/app.py b/redash/app.py index 1c592b3e70..554dca309f 100644 --- a/redash/app.py +++ b/redash/app.py @@ -1,5 +1,5 @@ from flask import Flask -from werkzeug.contrib.fixers import ProxyFix +from werkzeug.middleware.proxy_fix import ProxyFix from . import settings @@ -17,7 +17,7 @@ def __init__(self, *args, **kwargs): ) super(Redash, self).__init__(__name__, *args, **kwargs) # Make sure we get the right referral address even behind proxies like nginx. - self.wsgi_app = ProxyFix(self.wsgi_app, settings.PROXIES_COUNT) + self.wsgi_app = ProxyFix(self.wsgi_app, x_for=settings.PROXIES_COUNT, x_host=1) # Configure Redash using our settings self.config.from_object("redash.settings")