From 801b960cf4a7cdd5b85a4e35fe55dbf3decde2c4 Mon Sep 17 00:00:00 2001 From: cowboycoded Date: Fri, 4 Feb 2011 10:59:05 -0500 Subject: [PATCH] convert user-agent to lowercase when checking bots with wild cards --- app/controllers/impressionist_appliation_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/impressionist_appliation_controller.rb b/app/controllers/impressionist_appliation_controller.rb index 745781e..52904c8 100644 --- a/app/controllers/impressionist_appliation_controller.rb +++ b/app/controllers/impressionist_appliation_controller.rb @@ -43,7 +43,7 @@ class ApplicationController < ActionController::Base private def bypass Impressionist::Bots::WILD_CARDS.each do |wild_card| - return true if request.user_agent.include? wild_card + return true if request.user_agent.downcase.include? wild_card end Impressionist::Bots::LIST.include? request.user_agent end