1

I have a very specific need of allowing access to an unknown set of domains where they all have a common domain as referral.

Put the other way around I have a website including items (js, images, css, etc) from an unknown set of domains which I need to allow access through to.

I know referrals are set client side and can be edited. This is not a concern in this case as the users are already authenticated via credentials and logged.

Is allowing access based on referral possible in Squid?

2
  • @Bart De Vos, A "Thank you." being removed from the question? You have too much spare time.
    – mr-euro
    Oct 31, 2011 at 10:43
  • 1
    It takes seconds, I always do it when I read a question. It's a guideline: meta.serverfault.com/questions/876/… Oct 31, 2011 at 13:35

1 Answer 1

2

You can, using the referer acl-type - quoting the manual:

acl aclname referer_regex [-i] regexp ...
  # pattern match on Referer header [fast]
  # Referer is highly unreliable, so use with care

An example configuration that should work:

acl myreferer referer_regex -i ^http://www.example.org
http_access allow myreferer
1
  • Is this correct? I thought . was a metacharacter for any character Jan 21, 2016 at 5:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .