mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 19:53:51 +08:00
Revert "FEATURE: add Noindex to robots.txt for disallowed routes"
This reverts commit d84256a876
.
This is not supported by Google and causes robots.txt to be flagged as
invalid
Removing Noindex
This commit is contained in:
parent
85cdf213e1
commit
c587df7e2a
|
@ -10,7 +10,6 @@ Crawl-delay: <%= agent[:delay] %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<% agent[:disallow].each do |path| %>
|
<% agent[:disallow].each do |path| %>
|
||||||
Disallow: <%= path %>
|
Disallow: <%= path %>
|
||||||
Noindex: <%= path %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ RSpec.describe RobotsTxtController do
|
||||||
Discourse.stubs(:base_uri).returns('/forum')
|
Discourse.stubs(:base_uri).returns('/forum')
|
||||||
get '/robots.txt'
|
get '/robots.txt'
|
||||||
expect(response.body).to include("\nDisallow: /forum/admin")
|
expect(response.body).to include("\nDisallow: /forum/admin")
|
||||||
expect(response.body).to include("\nNoindex: /forum/admin")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user