mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
f209d3898f
- Refactor Rails::InfoController tests. - Return forbidden status from the InfoController for remote requests instead of a 500. - Add tests for displaying middleware in Rails::Info. Signed-off-by: Joshua Peek <josh@joshpeek.com>
9 lines
325 B
Ruby
9 lines
325 B
Ruby
class Rails::InfoController < ActionController::Base
|
|
def properties
|
|
if consider_all_requests_local || local_request?
|
|
render :inline => Rails::Info.to_html
|
|
else
|
|
render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => :forbidden
|
|
end
|
|
end
|
|
end
|