mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-08-25 09:54:43 +00: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
|