headers-more-nginx-module icon indicating copy to clipboard operation
headers-more-nginx-module copied to clipboard

Remove wildcard length lower limit

Open ggPeti opened this issue 3 years ago • 4 comments

This limitation seems arbitrary and I didn't find any discussion preceding it. So, I removed it. Verified with nginx 1.20.2.

ggPeti avatar Feb 13 '22 15:02 ggPeti

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_headers in conjunction with more_clear_headers *

ggPeti avatar Feb 15 '22 19:02 ggPeti

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_headers in conjunction with more_clear_headers *

I think it is acceptable. And you need to add some test cases for this PR.

zhuizhuhaomeng avatar Feb 16 '22 02:02 zhuizhuhaomeng

@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 avatar Apr 11 '22 13:04 ggPeti

@ggPeti
This is an example. https://github.com/openresty/headers-more-nginx-module/blob/master/t/sanity.t#L514

zhuizhuhaomeng avatar Apr 14 '22 13:04 zhuizhuhaomeng