mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
Old method: ```python ProxyFix(app, num_proxies=1) ``` https://werkzeug.palletsprojects.com/en/0.14.x/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix This uses forwarded values for `REMOTE_ADDR` and `HTTP_HOST`. New method: ```python ProxyFix(app, num_proxies=None, x_for=1, x_proto=0, x_host=0, x_port=0, x_prefix=0) ``` https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy_fix Setting `x_for=1` preserves the same behaviour as `num_proxies=1`. Setting `x_proto=1` and `x_host=1` will cause `REMOTE_ADDR`, `HTTP_HOST`, `SERVER_NAME` and `SERVER_PORT` to be forwarded. So we will be forwarding `SERVER_NAME` and `SERVER_PORT` which we weren’t before, but we think this is OK.
565 B
565 B