lib/guillotine/service.rb
# Checks to see if the input URL is using a valid host.  You can constrain
# the hosts with the `required_host` argument of the Service constructor.
#
# url - An Addressible::URI instance to check.
#
# Returns a 422 Rack::Response if the host is invalid, or nil.
Checks to see if the input URL is using a valid host.  You can constrain
the hosts with the `required_host` argument of the Service constructor.

An Addressible::URI instance to check.

Returns a 422 Rack::Response if the host is invalid, or nil.
Checks to see if the input URL is using a valid host . You can constrain the hosts with the ` required_host ` argument of the Service constructor . An Addressible :: URI instance to check . Returns a 422 Rack :: Response if the host is invalid or nil .
def check_host(url)
      if url.scheme !~ /^https?$/
        [422, {}, "Invalid url: #{url}"]
      else
        @options.host_checker.call url
      end
    end
def check_host ( url ) if url . scheme !~ / ^https?$ / [ 422 , { } , "Invalid url: #{url}" ] else @options . host_checker . call url end end
Checks to see if the input URL is using a valid host.
Checks to see if the input URL is using a valid host .
url
<not_specific>