Browse Source

Add X-Forwarded-Proto to proxy setup example

The ProxyFix middleware provided by Werkzeug uses this header for
returning accurate values from request.is_secure and request.scheme.
Without adding this header, Flask won't properly detect when it is being
served over HTTPS and will fail to generate proper external links and
cause certain extensions (e.g. Flask-OAuthlib) to function improperly.
Adding this header to the example setup should reduce issues encountered
by developers when following this guide.
pull/1456/head
Jon Banafato 10 years ago
parent
commit
887d382da1
  1. 1
      docs/deploying/wsgi-standalone.rst

1
docs/deploying/wsgi-standalone.rst

@ -100,6 +100,7 @@ localhost at port 8000, setting appropriate headers:
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

Loading…
Cancel
Save