Deny requests if URI ends with "/$" (regex) solved

Hello all,

i tried to deny requests if regexp matches the uri and ends just with a “/”. Unfortunately it does not work. The setup is HAproxy in OPNsense.

regexp looks like: .*$

If there is no path there is nothing to match.

is exactly the same as

it just sometimes displayed differently in the browser. The request line in both cases looks like:

GET / HTTP/1.1

Hi lukastribus,
your answer pointed me to the solution.
Now i have this regex: ^/$
In my case this fits, because every data which should be delivered has a filename with extension.
Thanks again!

1 Like