Commit 99695f1c authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '36836-fj-allow-indexing-snippets-in-robots' into 'master'

Resolve "Allow user snippets to be indexed"

See merge request gitlab-org/gitlab!45793
parents bdd332f3 7cb24edf
---
title: Allow user snippets to be indexed by search crawlers
merge_request: 45793
author:
type: changed
...@@ -24,8 +24,9 @@ Disallow: /help ...@@ -24,8 +24,9 @@ Disallow: /help
Disallow: /s/ Disallow: /s/
Disallow: /-/profile Disallow: /-/profile
Disallow: /-/ide/ Disallow: /-/ide/
# Only specifically allow the Sign In page to avoid very ugly search results # Restrict allowed routes to avoid very ugly search results
Allow: /users/sign_in Allow: /users/sign_in
Allow: /users/*/snippets
# Generic resource routes like new, edit, raw # Generic resource routes like new, edit, raw
# This will block routes like: # This will block routes like:
......
...@@ -14,7 +14,9 @@ RSpec.describe 'Robots.txt Requests', :aggregate_failures do ...@@ -14,7 +14,9 @@ RSpec.describe 'Robots.txt Requests', :aggregate_failures do
it 'allows the requests' do it 'allows the requests' do
requests = [ requests = [
'/users/sign_in', '/users/sign_in',
'/namespace/subnamespace/design.gitlab.com' '/namespace/subnamespace/design.gitlab.com',
'/users/foo/snippets',
'/users/foo/snippets/1'
] ]
requests.each do |request| requests.each do |request|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment