Closed AlexanderMcNulty closed 7 years ago
You should be setting up the appropriate HTTP headers so that Waitress or whatever Python web-server you are using can set up the WSGI environment properly:
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
For example will do the right thing. This is an NGINX configuration issue, not an issue with pyramid_blogr or with waitress, Caddy apparently forwards these headers already.
In a shell:
In another shell:
Visit localhost:3456 in your web browser.
Notice the form on the page posts to 127.0.0.1:6543, a different host.
Expected the form to post to 127.0.0.1:3456.