mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:50:14 +08:00
10 lines
281 B
Ruby
10 lines
281 B
Ruby
class RobotsTxtController < ApplicationController
|
|
layout false
|
|
skip_before_action :preload_json, :check_xhr, :redirect_to_login_if_required
|
|
|
|
def index
|
|
path = SiteSetting.allow_index_in_robots_txt ? :index : :no_index
|
|
render path, content_type: 'text/plain'
|
|
end
|
|
end
|