diff --git a/src/util/web.cr b/src/util/web.cr index 504bbaa..03af6a2 100644 --- a/src/util/web.cr +++ b/src/util/web.cr @@ -59,12 +59,7 @@ def hash_to_query(hash) end def request_path_startswith(env, ary) - ary.each do |prefix| - if env.request.path.starts_with? prefix - return true - end - end - false + ary.any? { |prefix| env.request.path.starts_with? prefix } end def requesting_static_file(env)