-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes in ProxyFix are not documented #1484
Comments
The signature of the previous version of werkzeug/werkzeug/contrib/fixers.py Line 120 in f1d15a2
The |
The fact that you need to specify the count for each one is documented: werkzeug/src/werkzeug/middleware/proxy_fix.py Lines 38 to 39 in 129b3fa
werkzeug/src/werkzeug/middleware/proxy_fix.py Lines 62 to 63 in 129b3fa
|
Hi @davidism, thanks for the response. I did not see a mention that the default behavior changed though. There was a default behavior, there is still one but they differ. Can't we add a warning regarding this? |
Not for nothing, but by changing the default behavior, you're going to cause anything that's validating a signed http request (like Twilio webhooks) to suddenly decide that all of the signatures it's seeing are wrong. |
In most server setups, the default is probably what you want, or you might enable |
When working from a clean slate, absolutely. But I think it might make sense to have the contrib wrapper that throws the deprecation warning supply defaults that match what the previous version of the class did. Some context for why folks might be cranky about this, since this is what happened to me: a fresh pip install of the same project and code, where flask was pinned to 1.0.2, but werkzeug wasn't pinned, can result in a broken site. |
* Fixes insufficiently documented changes in ProxyFix * pallets/werkzeug#1484 * Pin `Werkzeug==0.15.2` in requirements.txt * Allow exports test to parallelize
* Fixes insufficiently documented changes in ProxyFix * pallets/werkzeug#1484 * Pin `Werkzeug==0.15.2` in requirements.txt * Allow exports test to parallelize
Hi, it seems to me that ProxyFix got changes that were not documented in 0.15. While the documentation give information about the module having changed, it's signature and behavior changed to. The new signature is:
while the old ProxyFix
had this behavior:was behaving like this:As far as I can see, there is no warning in the documentation regarding the change in behavior and since this is not something that is tested with our unit tests, we did not caught it.
Is the change in behavior wanted?
Could we document it more clearly? Especially at https://werkzeug.palletsprojects.com/en/0.15.x/contrib/fixers/ wich only says:
Would it be possible that importing from
contrib.fixers
give the old behavior and for the documentation and the error message give more details about this change?Thanks a lot!
The text was updated successfully, but these errors were encountered: