Class: UrlNormalizer::Proxy

Inherits:
UrlNormalizer show all
Defined in:
lib/url_normalizer/proxy.rb

Constant Summary

Constants inherited from UrlNormalizer

VERSION

Instance Method Summary collapse

Methods inherited from UrlNormalizer

#build_query, #clean_query, #encode_component, #forbidden_uri_params, #initialize, normalize, normalize_for, #whitelisted_uri_params

Constructor Details

This class inherits a constructor from UrlNormalizer

Instance Method Details

#normalizeObject



5
6
7
8
9
10
11
12
13
# File 'lib/url_normalizer/proxy.rb', line 5

def normalize
  return super unless @uri.query
  actual_urls = CGI.parse(@uri.query)['url']
  if actual_urls
    UrlNormalizer.normalize actual_urls[0]
  else
    super
  end
end