1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/info_controller.rb
Santiago Pastorino 919888503d Moves local_request? to require.local?
[#5361 state:committed]
2010-08-13 17:35:52 -03:00

15 lines
438 B
Ruby

class Rails::InfoController < ActionController::Base
def properties
if consider_all_requests_local? || request.local?
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
protected
def consider_all_requests_local?
Rails.application.config.consider_all_requests_local
end
end