Class: ActionDispatch::HostAuthorization::DefaultResponseApp

Inherits:
Object
  • Object
show all
Defined in:
lib/action_dispatch/middleware/host_authorization.rb

Overview

:nodoc:

Constant Summary collapse

RESPONSE_STATUS =
403

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



91
92
93
94
95
96
97
# File 'lib/action_dispatch/middleware/host_authorization.rb', line 91

def call(env)
  request = Request.new(env)
  format = request.xhr? ? "text/plain" : "text/html"

  log_error(request)
  response(format, response_body(request))
end