Update comments
This commit is contained in:
parent
a0fc826122
commit
c88196b355
2 changed files with 5 additions and 8 deletions
|
|
@ -263,9 +263,10 @@ def create_app(config_obj=None):
|
|||
|
||||
# --- Reverse proxy middleware ---
|
||||
if os.getenv("IS_OPENSHIFT"):
|
||||
# ProxyFix uses parse_list_header() internally, so it correctly
|
||||
# handles duplicated values produced by HAProxy's append mode
|
||||
# (e.g. "https,https") without extra normalization.
|
||||
# ProxyFix is used instead of ReverseProxied because
|
||||
# it correctly handles duplicated values produced by
|
||||
# HAProxy's append mode (e.g. "https,https") without
|
||||
# extra normalization.
|
||||
app.wsgi_app = ProxyFix(
|
||||
app.wsgi_app,
|
||||
x_for=int(app.config["PROXYFIX_X_FOR"]),
|
||||
|
|
|
|||
|
|
@ -45,13 +45,9 @@ class Config(object):
|
|||
"forge.fedoraproject.org",
|
||||
)
|
||||
|
||||
# Proxy fix settings -- trust levels for X-Forwarded-* headers.
|
||||
# ProxyFix settings -- trust levels for X-Forwarded-* headers.
|
||||
# Each value = number of proxies trusted for that header (0 = ignore).
|
||||
# Overridable via env vars or settings.py.
|
||||
#
|
||||
# ProxyFix uses parse_list_header() internally, so duplicated values
|
||||
# from HAProxy's append mode (e.g. "https,https") are handled correctly
|
||||
# as a 2-element list -- no extra normalization needed.
|
||||
PROXYFIX_X_FOR = 2
|
||||
PROXYFIX_X_PROTO = 2
|
||||
PROXYFIX_X_HOST = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue