Method: ActionDispatch::HostAuthorization#call
- Defined in:
- actionpack/lib/action_dispatch/middleware/host_authorization.rb
#call(env) ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'actionpack/lib/action_dispatch/middleware/host_authorization.rb', line 135 def call(env) return @app.call(env) if .empty? request = Request.new(env) hosts = blocked_hosts(request) if hosts.empty? || excluded?(request) (request) @app.call(env) else env["action_dispatch.blocked_hosts"] = hosts @response_app.call(env) end end |