discourse/app/controllers/robots_txt_controller.rb

15 lines
278 B
Ruby
Raw Normal View History

class RobotsTxtController < ApplicationController
layout false
skip_before_filter :preload_json, :check_xhr
def index
path = if SiteSetting.allow_index_in_robots_txt
:index
else
:no_index
end
2013-02-25 11:42:20 -05:00
render path, content_type: 'text/plain'
end
end