The `ProxyFix` middleware in Python's Werkzeug library is used to fix the HTTP request when it passes through a reverse proxy server. It corrects the client's IP address and scheme information in the request headers by examining specific headers like `X-Forwarded-For` and `X-Forwarded-Proto`. This is particularly useful when a WSGI server (like Gunicorn or uWSGI) is deployed behind a load balancer or proxy server, where the original client's IP address and scheme might get obscured. The `ProxyFix` middleware ensures that the correct client IP address and scheme are passed on to the application server.
Python ProxyFix - 30 examples found. These are the top rated real world Python examples of werkzeug.middleware.proxy_fix.ProxyFix extracted from open source projects. You can rate examples to help us improve the quality of examples.