0

I’m trying to add a configuration in my Hap conf for a client, who is using a special header.

What I would like to do is to deny http requests if this header Is present and if the query do not contain strings that I would « whitelist » (like ABAB10 and BIBI24 etc).

I’Ve tried many things I found in documentation but unfortunately with no success. I Ve got 403 response.

Could anyone help me please ?

What I did :

http-request deny if { hdr(my_header) true } !{ path -m sub ABAB10 || BIBI24 }

I was expecting request with header my_header containing ABAB10 or BIBI24 to be allowed and all other denied).

(Best way would be if I would be able to use a file containing the part of the query I d like to allow )

Thanks in advance !

anx
  • 6,875
  • 4
  • 22
  • 45
  • path or header? – anx Nov 25 '20 at 21:29
  • You're right, I should have been acurate in my question I finally managed to do what I wanted to do which is : `http-request deny if { hdr(my_header) -m found } !{ url_param(foo) -f path_to_myallowed_barvalues}` – Chocolatine Nov 27 '20 at 10:36

0 Answers0