Update comments
All checks were successful
Run tests / test (pull_request) Successful in 33s
AI Code Review / ai-review (pull_request_target) Successful in 30s

This commit is contained in:
Jaroslav Groman 2026-06-24 11:53:40 +00:00
commit c88196b355
2 changed files with 5 additions and 8 deletions

View file

@ -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"]),

View file

@ -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