2006-03-29 10:11:47 -05:00
|
|
|
class Rails::InfoController < ActionController::Base
|
|
|
|
def properties
|
2010-08-13 16:34:20 -04:00
|
|
|
if consider_all_requests_local? || request.local?
|
2006-03-29 10:11:47 -05:00
|
|
|
render :inline => Rails::Info.to_html
|
|
|
|
else
|
2009-04-07 10:16:48 -04:00
|
|
|
render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => :forbidden
|
2006-03-19 13:45:26 -05:00
|
|
|
end
|
|
|
|
end
|
2010-02-01 05:40:27 -05:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def consider_all_requests_local?
|
|
|
|
Rails.application.config.consider_all_requests_local
|
|
|
|
end
|
2006-03-29 10:11:47 -05:00
|
|
|
end
|