Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7cb24edf
Commit
7cb24edf
authored
Oct 21, 2020
by
fjsanpedro
Committed by
Peter Leitzen
Oct 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow indexing user snippets in Robots.txt
parent
afb61632
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
changelogs/unreleased/36836-fj-allow-indexing-snippets-in-robots.yml
...unreleased/36836-fj-allow-indexing-snippets-in-robots.yml
+5
-0
public/robots.txt
public/robots.txt
+2
-1
spec/requests/robots_txt_spec.rb
spec/requests/robots_txt_spec.rb
+3
-1
No files found.
changelogs/unreleased/36836-fj-allow-indexing-snippets-in-robots.yml
0 → 100644
View file @
7cb24edf
---
title
:
Allow user snippets to be indexed by search crawlers
merge_request
:
45793
author
:
type
:
changed
public/robots.txt
View file @
7cb24edf
...
...
@@ -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:
...
...
spec/requests/robots_txt_spec.rb
View file @
7cb24edf
...
...
@@ -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
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment