method

allows?

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Permissions
allows?(host) public

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 42
      def allows?(host)
        @hosts.any? do |allowed|
          if allowed.is_a?(IPAddr)
            begin
              allowed === extract_hostname(host)
            rescue
              # IPAddr#=== raises an error if you give it a hostname instead of
              # IP. Treat similar errors as blocked access.
              false
            end
          else
            allowed === host
          end
        end
      end
Register or log in to add new notes.