Commit 7cb24edf authored by fjsanpedro's avatar fjsanpedro Committed by Peter Leitzen

Allow indexing user snippets in Robots.txt

parent afb61632
---
title: Allow user snippets to be indexed by search crawlers
merge_request: 45793
author:
type: changed
......@@ -24,8 +24,9 @@ Disallow: /help
Disallow: /s/
Disallow: /-/profile
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/*/snippets
# Generic resource routes like new, edit, raw
# This will block routes like:
......
......@@ -14,7 +14,9 @@ RSpec.describe 'Robots.txt Requests', :aggregate_failures do
it 'allows the requests' do
requests = [
'/users/sign_in',
'/namespace/subnamespace/design.gitlab.com'
'/namespace/subnamespace/design.gitlab.com',
'/users/foo/snippets',
'/users/foo/snippets/1'
]
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