On Tue, Jun 27, 2017 at 3:56 PM, Moomjian, Chad <[email protected]>
wrote:

> Hi,
>
>
>
> I am running haproxy v1.6.4, and I am attempting to block a specific
> request regex pattern. I am encountering issues with matching the question
> mark in the request. What I would like to block is requests that match this
> pattern:
>
> /api/…/…/sql?
>


​The ? is the delimiter between path and query string (collectively, the
"request URI").  It isn't valid for ? to appear in the path, so your
regexes testing for this against the path fetch will never match.

You're looking for something more like this:

acl uri_sql capture.req.uri -m reg -i ​^/api/(.*)?/sql\?.*$

​http://cbonte.github.io/haproxy-dconv/1.6/configuration.html#7.3.6-
capture.req.uri​

Reply via email to