Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion content/developer/reference/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,21 @@ HTTP
.. option:: --proxy-mode

enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy
support`_. Only enable this when running behind a trusted web proxy!
support`_.

It ignores all ``X-Forwarded-*`` headers in case ``X-Forwarded-Host`` is
missing from the request.

It always gets the real IP from the last entry of the ``X-Forwarded-For``
chain. Configure your web server accordingly using directives such as
nginx's `set_real_ip_from <https://nginx.org/en/docs/http/ngx_http_realip_module.html>`_
in case there are other trusted proxies along the chain that must be ignored.

``X-Forwarded-Proto`` and ``X-Forwarded-Host`` are used to update the
request root URL, which in turn is used to update the ``web.base.url``
system parameter upon a successful admin authentication. This system
parameter is used to generate all links for the current database; see
:ref:`domain-name/web-base-url`.


.. warning:: proxy mode *must not* be enabled outside of a reverse proxy
Expand Down