Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2019-07-01 19:40:17 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-08-11 21:11:49 +0300
commit76cbd7db6e69340cb53b8333f129373f3044bdc3 (patch)
treeed99ac51fb81b75f657aa56e21c8fe08f0e531ea
parent11cf253f52ec9a133d8d22802c9070aabf7cfa4c (diff)
Add X-Frame-Options header to .htaccess
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
-rw-r--r--.htaccess1
-rw-r--r--lib/private/legacy/response.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/.htaccess b/.htaccess
index cc2e0c95eb1..ba9ec86081a 100644
--- a/.htaccess
+++ b/.htaccess
@@ -17,6 +17,7 @@
Header set X-Download-Options "noopen"
Header set X-Permitted-Cross-Domain-Policies "none"
Header set Referrer-Policy "no-referrer"
+ Header set X-Frame-Options "SAMEORIGIN"
SetEnv modHeadersAvailable true
</IfModule>
diff --git a/lib/private/legacy/response.php b/lib/private/legacy/response.php
index 361a085c0c0..01c96c09222 100644
--- a/lib/private/legacy/response.php
+++ b/lib/private/legacy/response.php
@@ -94,7 +94,6 @@ class OC_Response {
. 'object-src \'none\'; '
. 'base-uri \'self\'; ';
header('Content-Security-Policy:' . $policy);
- header('X-Frame-Options: SAMEORIGIN'); // Disallow iFraming from other domains
// Send fallback headers for installations that don't have the possibility to send
// custom headers on the webserver side
@@ -105,6 +104,7 @@ class OC_Response {
header('X-Download-Options: noopen'); // https://msdn.microsoft.com/en-us/library/jj542450(v=vs.85).aspx
header('X-Permitted-Cross-Domain-Policies: none'); // https://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html
header('Referrer-Policy: no-referrer'); // https://www.w3.org/TR/referrer-policy/
+ header('X-Frame-Options: SAMEORIGIN'); // Disallow iFraming from other domains
}
}