mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
9 lines
240 B
Ruby
9 lines
240 B
Ruby
require 'open-uri'
|
|
|
|
module OpenURI
|
|
def OpenURI.redirectable?(uri1, uri2) # :nodoc:
|
|
uri1.scheme.downcase == uri2.scheme.downcase ||
|
|
(/\A(?:http|https|ftp)\z/i =~ uri1.scheme && /\A(?:http|https|ftp)\z/i =~ uri2.scheme)
|
|
end
|
|
end
|