convert user-agent to lowercase when checking bots with wild cards
This commit is contained in:
parent
64144c37aa
commit
801b960cf4
|
@ -43,7 +43,7 @@ class ApplicationController < ActionController::Base
|
||||||
private
|
private
|
||||||
def bypass
|
def bypass
|
||||||
Impressionist::Bots::WILD_CARDS.each do |wild_card|
|
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
|
end
|
||||||
Impressionist::Bots::LIST.include? request.user_agent
|
Impressionist::Bots::LIST.include? request.user_agent
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue