logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

open_uri_redirection.rb (240B)


  1. require 'open-uri'
  2. module OpenURI
  3. def OpenURI.redirectable?(uri1, uri2) # :nodoc:
  4. uri1.scheme.downcase == uri2.scheme.downcase ||
  5. (/\A(?:http|https|ftp)\z/i =~ uri1.scheme && /\A(?:http|https|ftp)\z/i =~ uri2.scheme)
  6. end
  7. end