Hi Will, Your using a response rewrite statement while matching a request information. The request is not in HAProxy anymore when the rspi* functions are processed by HAProxy.
If you want to do this, then I would do a use-backend with the app-api acl, then in this backend, run the rspi* statement to add/delete the headers. Baptiste On Fri, Nov 1, 2013 at 6:12 AM, Will Glass-Husain <[email protected]> wrote: > Hi, > > Can someone help me understand why I can't use ACL's (in a backend or > frontend) with rspidel and rspadd? Specifically what I am trying to do is > add a header to a response for specific URLs. > > Here's the error I get. It works if I leave off "if app-api". > > [WARNING] 303/235646 (19685) : parsing [temp.cfg:49] : acl 'app-api' will > never match because it only involves keywords that are incompatible with > 'backend http-response header rule' > Configuration file is valid > > with a haproxy.cfg containing this backend (excerpt): > > backend app > > server app1 10.0.2.11:8080 cookie app1 check inter 10000 > acl app-api path_beg /app/api/ > rspidel Access-Control-Allow-Origin:.* if app-api > rspadd Access-Control-Allow-Origin:\ *.abc.org if app-api > > > > Thanks, WILL >

