Skip to content

Commit

Permalink
set correct values for ProxyFix (#4630)
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Lachish committed Feb 9, 2020
1 parent 9b71b56 commit 80cfa3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redash/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Flask
from werkzeug.contrib.fixers import ProxyFix
from werkzeug.middleware.proxy_fix import ProxyFix

from . import settings

Expand All @@ -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")

Expand Down

0 comments on commit 80cfa3c

Please sign in to comment.