Skip to content

Commit

Permalink
11.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 1, 2023
1 parent 659bf18 commit d98a57f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
},
"scripts": {
"post-drupal-scaffold-cmd": [
"patch -Ns -r \"\" --no-backup-if-mismatch -p1 < ./patches/htaccess.patch"
"patch -Ns -r \"\" --no-backup-if-mismatch -p1 < ./patches/htaccess.patch",
"patch -Ns -r \"\" --no-backup-if-mismatch -p1 < ./patches/robotstxt.patch"
],
"init-lando": [
"cp lando/example.local.blt.yml blt/local.blt.yml",
Expand Down
14 changes: 14 additions & 0 deletions docroot/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# http://www.robotstxt.org/robotstxt.html

User-agent: *
Crawl-delay: 30
# CSS, JS, Images
Allow: /core/*.css$
Allow: /core/*.css?
Expand Down Expand Up @@ -63,3 +64,16 @@ Disallow: /index.php/user/login
Disallow: /index.php/user/logout
Disallow: /index.php/media/oembed
Disallow: /index.php/*/media/oembed
# Block saml paths links
Disallow: /sso/login
Disallow: /saml_login
Disallow: /saml/login
Disallow: /saml/acs
# Block Femtosearch
User-agent: FemtosearchBot
Crawl-Delay: 120
Disallow: /
# Block SemrushBot
User-agent: SemrushBot
Crawl-Delay: 120
Disallow: /
29 changes: 29 additions & 0 deletions patches/robotstxt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/docroot/robots.txt b/docroot/robots.txt
index ebcd04b..8927a2b 100644
--- a/docroot/robots.txt
+++ b/docroot/robots.txt
@@ -14,6 +14,7 @@
# http://www.robotstxt.org/robotstxt.html

User-agent: *
+Crawl-delay: 30
# CSS, JS, Images
Allow: /core/*.css$
Allow: /core/*.css?
@@ -63,3 +64,16 @@ Disallow: /index.php/user/login
Disallow: /index.php/user/logout
Disallow: /index.php/media/oembed
Disallow: /index.php/*/media/oembed
+# Block saml paths links
+Disallow: /sso/login
+Disallow: /saml_login
+Disallow: /saml/login
+Disallow: /saml/acs
+# Block Femtosearch
+User-agent: FemtosearchBot
+Crawl-Delay: 120
+Disallow: /
+# Block SemrushBot
+User-agent: SemrushBot
+Crawl-Delay: 120
+Disallow: /

0 comments on commit d98a57f

Please sign in to comment.