mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-20 12:32:39 -05:00
d2596c3c4c
boolean to avoid locking yourself out by setting access_password to empty string. Minor UI tweaks.
15 lines
347 B
Ruby
15 lines
347 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.access_password.blank?
|
|
:index
|
|
else
|
|
:no_index
|
|
end
|
|
|
|
render path, content_type: 'text/plain'
|
|
end
|
|
end
|