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?

Bart De Vos
  • 17,911
  • 6
  • 63
  • 82
mr-euro
  • 848
  • 3
  • 14
  • 31
  • @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: http://meta.serverfault.com/questions/876/edit-powers-activate-removing-hi-thanks – Bart De Vos Oct 31 '11 at 13:35

1 Answers1

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
Kvisle
  • 4,193
  • 24
  • 25