Hi James, On Wed, Jan 22, 2020 at 04:19:41PM -0800, James Brown wrote: > We're upgrading from 1.8 to 2.x and one of the things I've noticed is that > reqidel and rspidel seem to be totally gone in 2.1... What's the new > recommendation to delete headers from request/response based on a regular > expression? Do I have to write a Lua action to do this now? I read through > the documentation for http-request and http-response and there doesn't seem > to be an `http-request del-header-by-regex`... > > Our use case is that we have dozens of different internal headers behind a > prefix, and we promise that we'll strip them all for incoming requests and > outgoing responses at the edge load balancer. That is harder to do if we > can't delete all headers matching a certain regex...
That's an intereting use case, which I find totally legitimate and that we need to figure how to address. In 2.0 you can still rely on rspdel but we then need to have a solution for 2.2. Probably that in the short term using Lua will be the easiest solution. And maybe we'd need to add a new action such as "del-headers" which would take a regex or a prefix. By the way, are all your headers identified by the same prefix ? I'm asking because if that's the case, maybe we could append an optional argument to del-header to mention that we want to delete all those starting with this prefix and not just this exact one. Willy