Efficient domain filtering using regex in ruby
===

I'm building a rack server app that has to filter domains that can access the data.
This is currently how i do that and it works fine:

       authorized_domains = /domain1.com|domain2.com|domain3.com/
       return [417, {"Content-Type" => "text/html"}, ["Expectation Failed"]] unless env['HTTP_REFERER'].match(authorized_domains)

The problem is that i would get probably half a million request a day
or even more, and on top of that i would have about 1000-3000 domains on the list.

Is this the most efficient filtering there is? doing a regex on the list of domains?