headers-more-nginx-module
headers-more-nginx-module copied to clipboard
Remove wildcard length lower limit
This limitation seems arbitrary and I didn't find any discussion preceding it. So, I removed it. Verified with nginx 1.20.2.
Hi @agentzh, thanks for this wonderful module.
What do you think about removing this limitation? I am using the patched version without issues, I think it's very useful sometimes to remove all headers from a proxied upstream.
My use case is that I'm using Nextcloud as a file server, and it sends a bunch of session cookies and other unwanted headers. I really only need Content-Type and Content-Length, which need is perfectly covered by two proxy_pass_header
s in conjunction with more_clear_headers *
Hi @agentzh, thanks for this wonderful module. What do you think about removing this limitation? I am using the patched version without issues, I think it's very useful sometimes to remove all headers from a proxied upstream. My use case is that I'm using Nextcloud as a file server, and it sends a bunch of session cookies and other unwanted headers. I really only need Content-Type and Content-Length, which need is perfectly covered by two
proxy_pass_header
s in conjunction withmore_clear_headers *
I think it is acceptable. And you need to add some test cases for this PR.
@zhuizhuhaomeng I am at a loss for ideas how to add relevant tests to a change that removes a gratuitous error case. @agentzh would you mind merging this?
@ggPeti
This is an example.
https://github.com/openresty/headers-more-nginx-module/blob/master/t/sanity.t#L514