class method
self.new
Ruby on Rails 6.1.7.10
Since v6.0.6Signature
self.new(app, hosts, deprecated_response_app = nil, exclude: nil, response_app: nil)
No documentation comment.
Parameters
-
appreq -
hostsreq -
deprecated_response_appopt = nil -
excludekey = nil -
response_appkey = nil
Source
# File actionpack/lib/action_dispatch/middleware/host_authorization.rb, line 124
def initialize(app, hosts, deprecated_response_app = nil, exclude: nil, response_app: nil)
@app = app
@permissions = Permissions.new(hosts)
@exclude = exclude
unless deprecated_response_app.nil?
ActiveSupport::Deprecation.warn(<<-MSG.squish)
`action_dispatch.hosts_response_app` is deprecated and will be ignored in Rails 7.0.
Use the Host Authorization `response_app` setting instead.
MSG
response_app ||= deprecated_response_app
end
@response_app = response_app || DefaultResponseApp.new
end
Defined in actionpack/lib/action_dispatch/middleware/host_authorization.rb line 124
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::HostAuthorization