summaryrefslogtreecommitdiff
path: root/docs/reverse-proxy.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-09-22 15:16:49 -0700
committerSteve Piercy <web@stevepiercy.com>2018-09-22 15:16:49 -0700
commit5cac0de5603764af8f9bf095ef5c40d848e6ddcc (patch)
tree60c50ec884291c59213e41313fcd5099b263f856 /docs/reverse-proxy.rst
parentefffb45666c1ebd4bf740c9ac80a12e3cebc0449 (diff)
downloadwaitress-5cac0de5603764af8f9bf095ef5c40d848e6ddcc.tar.gz
Use proper syntax highlighting
Diffstat (limited to 'docs/reverse-proxy.rst')
-rw-r--r--docs/reverse-proxy.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/reverse-proxy.rst b/docs/reverse-proxy.rst
index 9f1bec5..2532180 100644
--- a/docs/reverse-proxy.rst
+++ b/docs/reverse-proxy.rst
@@ -133,14 +133,18 @@ the client to your Waitress server, as well as sending along a
If your proxy accepts both HTTP and HTTPS URLs, and you want your application
to generate the appropriate url based on the incoming scheme, also set up
your proxy to send a ``X-Forwarded-Proto`` with the original URL scheme along
-with each proxied request. For example, when using nginx::
+with each proxied request. For example, when using nginx.
+
+.. code-block:: nginx
proxy_set_header X-Forwarded-Proto $scheme;
It's permitted to set an ``X-Forwarded-For`` header too; the
``PrefixMiddleware`` uses this to adjust other environment variables (you'll
have to read its docs to find out which ones, I don't know what they are). For
-the ``X-Forwarded-For`` header::
+the ``X-Forwarded-For`` header.
+
+.. code-block:: nginx
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;