FEATURE: Send a 'noindex' header in non-canonical responses (#15026)

* FEATURE: Optionally send a 'noindex' header in non-canonical responses

This will be used in a SEO experiment.

Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
Rafael dos Santos Silva
2021-11-25 16:58:39 -03:00
committed by GitHub
parent 1166afa4e8
commit 5647819de4
5 changed files with 56 additions and 17 deletions

View File

@ -176,12 +176,6 @@ describe GroupsController do
)
end
it 'should return correct X-Robots-Tag header when allow_index_in_robots_txt is set to false' do
SiteSetting.allow_index_in_robots_txt = false
get "/groups"
expect(response.headers['X-Robots-Tag']).to eq('noindex, nofollow')
end
context 'viewing groups of another user' do
describe 'when an invalid username is given' do
it 'should return the right response' do