mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 12:11:16 -05:00
15 lines
299 B
Ruby
15 lines
299 B
Ruby
|
class RobotsTxtController < ApplicationController
|
||
|
layout false
|
||
|
skip_before_filter :check_xhr
|
||
|
|
||
|
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
|