mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 06:53:46 +08:00
15 lines
263 B
Ruby
15 lines
263 B
Ruby
class RobotsTxtController < ApplicationController
|
|
layout false
|
|
skip_before_filter :check_xhr
|
|
|
|
def index
|
|
path = if SiteSetting.allow_index_in_robots_txt
|
|
:index
|
|
else
|
|
:no_index
|
|
end
|
|
|
|
render path, content_type: 'text/plain'
|
|
end
|
|
end
|