lib/seo_cache/middleware.rb in seo_cache-0.18.0 vs lib/seo_cache/middleware.rb in seo_cache-0.19.0

- old
+ new

@@ -76,9 +76,12 @@ return false if env['REQUEST_METHOD'] != 'GET' request = Rack::Request.new(env) query_params = Rack::Utils.parse_query(request.query_string) + # Check if user connected + return false if !SeoCache.cache_with_user_connected && (env['warden'].respond_to?(:user) && env['warden'].user.present?) + # If it is the generated page...don't prerender return false if query_params.has_key?(SeoCache.prerender_url_param) # if it is a bot and host doesn't contain these domains...don't prerender return false if SeoCache.whitelist_hosts.present? && SeoCache.whitelist_hosts.none? { |host| request.host.include?(host) }