|
From: | noreply |
Subject: | [myexperiment-hackers] [1894] trunk/app/controllers/application.rb: Improvement over the last commit: now referer is compared against BASE_URI (meaning that "site usage" will correctly determined for any environment, not just the live site). |
Date: | Tue, 28 Oct 2008 13:41:42 -0400 (EDT) |
Improvement over the last commit: now referer is compared against BASE_URI (meaning that "site usage" will correctly determined for any environment, not just the live site).
--- trunk/app/controllers/application.rb 2008-10-28 16:35:07 UTC (rev 1893)
+++ trunk/app/controllers/application.rb 2008-10-28 17:41:42 UTC (rev 1894)
@@ -31,8 +31,8 @@
res = false
referer = request.env['HTTP_REFERER']
- unless referer.nil?
- res = referer.include?("myexperiment")
+ unless referer.nil? || referer.match("^#{BASE_URI}").nil?
+ res = true
end
return res
[Prev in Thread] | Current Thread | [Next in Thread] |