Skip to content

Commit

Permalink
Improve the proxy fix docs
Browse files Browse the repository at this point in the history
This should make it clearer what the trusted_hops argument should be.
This is based on the Werkzeug docs.
  • Loading branch information
pgjones committed May 26, 2024
1 parent 0a23657 commit d264794
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/how_to_guides/proxy_fix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ wrap your app and serve the wrapped app,
user-agent (client) may be trusted and hence able to set
alternative for, proto, and host values. This can, depending on
your usage in the app, lead to security vulnerabilities.

The ``trusted_hops`` argument should be set to the number of proxies
that are chained in front of Hypercorn. You should set this to how
many proxies are setting the headers so the middleware knows what to
trust.

0 comments on commit d264794

Please sign in to comment.