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?

link|improve this question

@Bart De Vos, A "Thank you." being removed from the question? You have too much spare time. – mr-euro Oct 31 '11 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/… – Bart De Vos Oct 31 '11 at 13:35
feedback

1 Answer

up vote 1 down vote accepted

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
link|improve this answer
Cheers Kvisle ! – mr-euro Oct 31 '11 at 10:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.