diff options
author | Steve Piercy <web@stevepiercy.com> | 2018-09-22 15:16:49 -0700 |
---|---|---|
committer | Steve Piercy <web@stevepiercy.com> | 2018-09-22 15:16:49 -0700 |
commit | 5cac0de5603764af8f9bf095ef5c40d848e6ddcc (patch) | |
tree | 60c50ec884291c59213e41313fcd5099b263f856 /docs/reverse-proxy.rst | |
parent | efffb45666c1ebd4bf740c9ac80a12e3cebc0449 (diff) | |
download | waitress-5cac0de5603764af8f9bf095ef5c40d848e6ddcc.tar.gz |
Use proper syntax highlighting
Diffstat (limited to 'docs/reverse-proxy.rst')
-rw-r--r-- | docs/reverse-proxy.rst | 8 |
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; |