Re: AW: Delete response headers unless condition give me a warning
Ricardo F <rikr_@...> writes: > > Hello, > Thanks for the responses, At least i found that my tought are correct. > > If you have enought time, Willy, i will read the explanation gladly but if someone are in the same situation as me, this is other workaroung: > > rspidel ^X-[abcdefghiklmnopqrstuvwxyz].* > > All letters except "J" ;) > > > Regards, > > Ricardo F. > > > From: andreas.mock-jie1t0cjddqb1svskn2...@public.gmane.org> To: bedis9-re5jqeeqqe8avxtiumw...@public.gmane.org; w 1wt.eu> CC: rikr_-pkbjnfxxiarbdgjk7y7...@public.gmane.org; haproxy-jklxk3lifipg9huczpv...@public.gmane.org> Subject: AW: Delete response headers unless condition give me a warning> Date: Fri, 13 Sep 2013 11:18:08 +> > Me too, I love hearing dirty things.> That doesn't mean I'll do them... > > Best regards> Andreas Mock> > > -Ursprüngliche Nachricht-> Von: Baptiste [mailto:bedis9-re5jqeeqqe8avxtiumw...@public.gmane.org] > Gesendet: Donnerstag, 12. September 2013 22:53> An: Willy Tarreau> Cc: Ricardo F; haproxy formilux.org> Betreff: Re: Delete response headers unless condition give me a warning> > > If this is the case, I do have a solution that we elaborated a few weeks> > ago when discussing with Bertrand (who confirmed it worked). A very dirty> > one. I'd prefer to explain it only if absolutely needed though!> >> > Willy> >> > Actually, I'm interested :)> > Baptiste> > > > > Why not write : rspidel ^X-[^j] ? regards
RE: AW: Delete response headers unless condition give me a warning
Hello, Thanks for the responses, At least i found that my tought are correct. If you have enought time, Willy, i will read the explanation gladly but if someone are in the same situation as me, this is other workaroung: rspidel ^X-[abcdefghiklmnopqrstuvwxyz].* All letters except J ;) Regards, Ricardo F. From: andreas.m...@drumedar.de To: bed...@gmail.com; w...@1wt.eu CC: ri...@hotmail.com; haproxy@formilux.org Subject: AW: Delete response headers unless condition give me a warning Date: Fri, 13 Sep 2013 11:18:08 + Me too, I love hearing dirty things. That doesn't mean I'll do them... ;-) Best regards Andreas Mock -Ursprüngliche Nachricht- Von: Baptiste [mailto:bed...@gmail.com] Gesendet: Donnerstag, 12. September 2013 22:53 An: Willy Tarreau Cc: Ricardo F; haproxy@formilux.org Betreff: Re: Delete response headers unless condition give me a warning If this is the case, I do have a solution that we elaborated a few weeks ago when discussing with Bertrand (who confirmed it worked). A very dirty one. I'd prefer to explain it only if absolutely needed though! Willy Actually, I'm interested :) Baptiste
AW: Delete response headers unless condition give me a warning
Me too, I love hearing dirty things. That doesn't mean I'll do them... ;-) Best regards Andreas Mock -Ursprüngliche Nachricht- Von: Baptiste [mailto:bed...@gmail.com] Gesendet: Donnerstag, 12. September 2013 22:53 An: Willy Tarreau Cc: Ricardo F; haproxy@formilux.org Betreff: Re: Delete response headers unless condition give me a warning If this is the case, I do have a solution that we elaborated a few weeks ago when discussing with Bertrand (who confirmed it worked). A very dirty one. I'd prefer to explain it only if absolutely needed though! Willy Actually, I'm interested :) Baptiste
Re: Delete response headers unless condition give me a warning
Hi Ricardo, I guess this is your server which sends the X-JSON header. So you can match it like this: acl header_app shdr_cnt(X-JSON) gt 0 rspidel ^X-.* unless header_app or acl header_app res.hdr_cnt(X-JSON) gt 0 rspidel ^X-.* unless header_app depending on your HAProxy version, res.hdr_cnt might not work (only works in very recent versions). Note that if the X-JSON header is sent in the request, there is no solution for you for now in HAProxy. Baptiste On Tue, Sep 10, 2013 at 4:35 PM, Ricardo F ri...@hotmail.com wrote: Hello, I'm trying to delete some headers in a frontend based on a condition, but when i set the acl: acl header_app hdr_cnt(X-JSON) gt 0 rspidel ^X-.* unless header_app A warning message is print: acl 'header_app' will never match because it only involves keywords that are incompatible with 'frontend http-response header rule' Configuration file is valid I don't understand exactly how can i do that. Any alternative? Thanks, Ricardo F.
Re: Delete response headers unless condition give me a warning
On Thu, Sep 12, 2013 at 03:07:17PM +0200, Baptiste wrote: Hi Ricardo, I guess this is your server which sends the X-JSON header. So you can match it like this: acl header_app shdr_cnt(X-JSON) gt 0 rspidel ^X-.* unless header_app or acl header_app res.hdr_cnt(X-JSON) gt 0 rspidel ^X-.* unless header_app depending on your HAProxy version, res.hdr_cnt might not work (only works in very recent versions). Note that if the X-JSON header is sent in the request, there is no solution for you for now in HAProxy. If this is the case, I do have a solution that we elaborated a few weeks ago when discussing with Bertrand (who confirmed it worked). A very dirty one. I'd prefer to explain it only if absolutely needed though! Willy
Re: Delete response headers unless condition give me a warning
If this is the case, I do have a solution that we elaborated a few weeks ago when discussing with Bertrand (who confirmed it worked). A very dirty one. I'd prefer to explain it only if absolutely needed though! Willy Actually, I'm interested :) Baptiste
Delete response headers unless condition give me a warning
Hello, I'm trying to delete some headers in a frontend based on a condition, but when i set the acl: acl header_app hdr_cnt(X-JSON) gt 0 rspidel ^X-.* unless header_app A warning message is print: acl 'header_app' will never match because it only involves keywords that are incompatible with 'frontend http-response header rule' Configuration file is valid I don't understand exactly how can i do that. Any alternative? Thanks, Ricardo F.