method

sanitize_string

Importance_0
v7.1.3.2 - Show latest stable - 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 73
        def sanitize_string(host)
          if host.start_with?(".")
            /\A#{SUBDOMAIN_REGEX}?#{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.