discourse/app/controllers/robots_txt_controller.rb

10 lines
281 B
Ruby
Raw Normal View History

class RobotsTxtController < ApplicationController
layout false
2016-04-01 05:33:25 +08:00
skip_before_filter :preload_json, :check_xhr, :redirect_to_login_if_required
def index
2016-04-01 05:33:25 +08:00
path = SiteSetting.allow_index_in_robots_txt ? :index : :no_index
render path, content_type: 'text/plain'
end
end