This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/app/controllers/robots_txt_controller.rb

9 lines
281 B
Ruby

class RobotsTxtController < ApplicationController
layout false
skip_before_filter :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