summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-02-16 11:39:37 +0100
committerGitHub <noreply@github.com>2023-02-16 11:39:37 +0100
commitbc91dca7035c06e32131d23565f30535b8850bb0 (patch)
treebc78d558675282b5d2f5eda4b790f39dad36fadc /lib
parentb2e3b46c33265d9a95714237254d67a1d8055599 (diff)
parent5f90b8eb118324627d5845e2a7a6fa8613bf4579 (diff)
downloadnextcloud-server-bc91dca7035c06e32131d23565f30535b8850bb0.tar.gz
nextcloud-server-bc91dca7035c06e32131d23565f30535b8850bb0.zip
Merge pull request #36689 from nextcloud/fix/x-robots-tag-header
Change X-Robots-Tag header from "none" to "noindex, nofollow"
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_Response.php2
-rw-r--r--lib/public/AppFramework/Http/Response.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php
index e4525fe9e10..9440feae3cd 100644
--- a/lib/private/legacy/OC_Response.php
+++ b/lib/private/legacy/OC_Response.php
@@ -99,7 +99,7 @@ class OC_Response {
header('X-Content-Type-Options: nosniff'); // Disable sniffing the content type for IE
header('X-Frame-Options: SAMEORIGIN'); // Disallow iFraming from other domains
header('X-Permitted-Cross-Domain-Policies: none'); // https://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html
- header('X-Robots-Tag: none'); // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
+ header('X-Robots-Tag: noindex, nofollow'); // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
header('X-XSS-Protection: 1; mode=block'); // Enforce browser based XSS filters
}
}
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index 4db6caa556c..152f8c4a3c5 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -257,7 +257,7 @@ class Response {
$this->headers['Content-Security-Policy'] = $this->getContentSecurityPolicy()->buildPolicy();
$this->headers['Feature-Policy'] = $this->getFeaturePolicy()->buildPolicy();
- $this->headers['X-Robots-Tag'] = 'none';
+ $this->headers['X-Robots-Tag'] = 'noindex, nofollow';
if ($this->ETag) {
$mergeWith['ETag'] = '"' . $this->ETag . '"';