mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-25 00:00:52 -04:00
Simplify the request_path_startswith helper method
This commit is contained in:
+1
-6
@@ -59,12 +59,7 @@ def hash_to_query(hash)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def request_path_startswith(env, ary)
|
def request_path_startswith(env, ary)
|
||||||
ary.each do |prefix|
|
ary.any? { |prefix| env.request.path.starts_with? prefix }
|
||||||
if env.request.path.starts_with? prefix
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def requesting_static_file(env)
|
def requesting_static_file(env)
|
||||||
|
|||||||
Reference in New Issue
Block a user