mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:38:30 +08:00
16 lines
345 B
Ruby
16 lines
345 B
Ruby
class RobotsTxtController < ApplicationController
|
|
layout false
|
|
skip_before_filter :check_xhr
|
|
skip_before_filter :check_restricted_access
|
|
|
|
def index
|
|
path = if SiteSetting.allow_index_in_robots_txt && !SiteSetting.restrict_access
|
|
:index
|
|
else
|
|
:no_index
|
|
end
|
|
|
|
render path, content_type: 'text/plain'
|
|
end
|
|
end
|