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
Rewrite middleware and fallthrough #515
Comments
I think we should keep it. I'd like to add it to the k8s one too. |
Or maybe to etcd. |
Ack. I can live with that. Maybe we should elevate it to be part of the Handler interface, as a |
Best thing now is to document this behavior in |
Adding fallthrough in general as a highlevel option would enable workarounds like having multiple |
[ Quoting <notifications@github.com> in "Re: [miekg/coredns] Rewrite middlew..." ]
Adding fallthrough in general as a highlevel option would enable workarounds like having multiple ```auto``` directives within one server. Basically abusing fallthrough and the proxy middleware.
5053 -> auto . {} + proxy -> 5054 -> auto . {} + proxy -> 5055 -> k8s + proxy -> public resolution.
Huge performance issue, but would enable various workarounds and enable testing various solutions in the wild (ignoring the performance hit) until we can implement or decide to implement it.
Not only a performance issue - what if your resolution fails, how do you debug
that? What about loops?
/Miek
…--
Miek Gieben
|
One could also produce loops with the rewrite fallthrough. Debugging could be harder, but we could help by writing to the log each time a request falls through. |
Update middleware.md to describe the need and use of `fallthrough* in middlewares. Fixes #515
While documenting the fallthrough behavior and testing it I noticed the did not properly work. This PR does a tiny bit too much as it - Documents fallthrough - Fixes fallthrough in reverse - Makes directives_generate complain on duplicate priorities - Moved reverse *before* file in middleware.cfg - Add a test that tests the reverse fallthrough behavior with a file backend Fixes #515
* Document fallthrough and fix *reverse* While documenting the fallthrough behavior and testing it I noticed the did not properly work. This PR does a tiny bit too much as it - Documents fallthrough - Fixes fallthrough in reverse - Makes directives_generate complain on duplicate priorities - Moved reverse *before* file in middleware.cfg - Add a test that tests the reverse fallthrough behavior with a file backend Fixes #515 * ....and fix the tests
The rewrite middleware has
fallthrough
(at my request) to allows for falling through to the next middleware even though this middleware should be authoritative for this name.q: should we keep something like
fallthrough
or just allow it? I'm not sure about the ramifications, but my gut feeling says that just allowing it can lead to weird to debug DNS issues... (and God forbid, maybe loops).I'm also a fan of keeping things explicit; hence I think I'm in favor of keeping it.
The text was updated successfully, but these errors were encountered: