Skip to content

A platform for community discussion. Free, open, simple.

Minor change to case-insensitive regex for s3_presigned_url?

Martin Brennan5f1749a1c031
diff --git a/lib/url_helper.rb b/lib/url_helper.rb
index e1299c33585..893af239df9 100644
--- a/lib/url_helper.rb
+++ b/lib/url_helper.rb
@@ -68,7 +68,7 @@ class UrlHelper
end
def self.s3_presigned_url?(url)
- (url.downcase =~ /x-amz-algorithm|x-amz-credential/).present?
+ url[/x-amz-(algorithm|credential)/i].present?
end
def self.cook_url(url, secure: false)