Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4737

HTTP deny conditions

$
0
0

Hey,

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 !

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>