On Monday, January 7, 2019 at 5:00:43 PM UTC-5, Jonathan Vanasco wrote: > > > It would be nice if that functionality could be implemented as middleware > when not running the waitress server. >
This release broke our dev systems from the wsgi manipulation. The issue was this line to the nginx config from the instructions: proxy_set_header X-Forwarded-Host $host:$server_port; While the the `:$server_port` bit appears in many tutorials and docs on some projects, it isn't part of a standard or a standard/requirement. Even nginx's official docs has conflicting usage patterns with it: * https://www.nginx.com/resources/wiki/start/topics/examples/likeapache/ * https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/ I can't tell if that bit was required by your code. It doesn't look like it is required (via `task.py` lines 531+) but perhaps a warning about that would help. Sidenote: it looks like the strip on line 680 may be better placed just above the immediate conditional - if forwarded_host: - - forwarded_host = forwarded_host.strip() # might be better as... + forwarded_host = forwarded_host.strip() + if forwarded_host: My initial feeling on this release is that I dislike this implementation. This approach will create a lot of added complexity for those who use waitress for Pyramid in development BUT run other servers in Production and/or Staging - we now have to deal with a deploying something where Waitress inherently takes control of this portion of wsgi manipulation in one environment, but is not run at all in other environments. IMHO, it would be really nice if... 1. this happened within Pyramid (not likely to happen, I know) or 2. this functionality were exposed as a callable, so other deployments can invoke it. This will still create some pain in maintaining dual deployment logics, but invoking waitress's logic would ensure parity. Finally... for the docs... if using an ini file, the syntax is; [server:main] use = egg:waitress#main host = 127.0.0.1 port = 5020 trusted_proxy = 127.0.0.1 trusted_proxy_headers = x-forwarded-for x-forwarded-host x-forwarded-proto x -forwarded-port using a quoted format from the current docs will generate an error: trusted_proxy_headers = "x-forwarded-for x-forwarded-host x-forwarded-proto x-forwarded-port" -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/01761583-c857-412f-80c3-117c6af4f82c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.