lib/nexaas/throttle/guardian.rb in nexaas-throttle-2.0.0 vs lib/nexaas/throttle/guardian.rb in nexaas-throttle-2.0.1

- old
+ new

@@ -27,17 +27,17 @@ yield if block_given? end def assets? path = request.path - path.match(/\/assets/).present? || path.match(extensions_regexp).present? + path.match(%r{/assets}).present? || path.match(extensions_regexp).present? end def extensions_regexp @assets_extensions ||= begin - extensions = %w(css js png jpg gif) - /\.(#{extensions.join("|")})/ - end + extensions_group = %w(css js png jpg gif).join("|") + /\.(#{extensions_group})(\?\S*)?$/ + end end def ignore_user_agents? ignored_user_agents && !ignored_user_agents.map { |regexp| regexp.match(request.user_agent) }.compact.blank? end