lib/nexaas/throttle/guardian.rb in nexaas-throttle-0.2.0 vs lib/nexaas/throttle/guardian.rb in nexaas-throttle-1.0.0
- old
+ new
@@ -43,10 +43,10 @@
/\.(#{extensions.join("|")})/
end
end
def ignore_user_agents?
- ignored_user_agents && ignored_user_agents.include?(request.user_agent)
+ ignored_user_agents && !ignored_user_agents.map { |regexp| regexp.match(request.user_agent) }.compact.blank?
end
end
end
end