Flowdock
method

sanitize_string

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Permissions
sanitize_string(host) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/middleware/host_authorization.rb, line 72
        def sanitize_string(host)
          if host.start_with?(".")
            /\A([a-z0-9-]+\.)?#{Regexp.escape(host[1..-1])}#{PORT_REGEX}?\z/
          else
            /\A#{Regexp.escape host}#{PORT_REGEX}?\z/
          end
        end
Register or log in to add new notes.