mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FIX: robots.txt should be accessible even when login is required
This commit is contained in:
parent
de344bcd7e
commit
d75cc67d86
@ -1,14 +1,9 @@
|
||||
class RobotsTxtController < ApplicationController
|
||||
layout false
|
||||
skip_before_filter :preload_json, :check_xhr
|
||||
skip_before_filter :preload_json, :check_xhr, :redirect_to_login_if_required
|
||||
|
||||
def index
|
||||
path = if SiteSetting.allow_index_in_robots_txt
|
||||
:index
|
||||
else
|
||||
:no_index
|
||||
end
|
||||
|
||||
path = SiteSetting.allow_index_in_robots_txt ? :index : :no_index
|
||||
render path, content_type: 'text/plain'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user