mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Simplify the request_path_startswith helper method
This commit is contained in:
parent
bd34b803f1
commit
ce88acb9e5
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user