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

Getting a string from the CDN HTTP request

$
0
0

Hi guys,

I have been trying for a long time to get this to work without much success :frowning:
I hope someone here can point me in the right direction :pray:

A website via CDN, has this string on its header.
This is on the CDN side meaning, the HaProxy is able to identify it.

    set req.http.shared-secret = "PASSWORD";

How can I make HaProxy to identify, and accept the HTTP request if that string is present?

The idea is that HaProxy will only accept the request if that string is identified, deny otherwise. Requested coming outside the CDN will be blocked.

I’ve tried this but it does not work. Only the main page works, If I try to navigate the website I get no access. I am not expert so I don’t know what is exactly wrong.

    acl allow_traffic_from_cdn req.hdr(Host) -m str PASSWORD
    http-request deny if !allow_traffic_from_cdn

Any idea is welcome.

Thank you

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4717

Trending Articles



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