]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add X-Frame-Options header to .htaccess
authorJ0WI <J0WI@users.noreply.github.com>
Mon, 1 Jul 2019 16:40:17 +0000 (18:40 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Sun, 11 Aug 2019 18:11:49 +0000 (20:11 +0200)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
.htaccess
lib/private/legacy/response.php

index cc2e0c95eb11c3ee21973dfa3cbc8a0205f47f9d..ba9ec86081a4e62ad3b219907138906c89babd6a 100644 (file)
--- 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>
 
index 361a085c0c05516c99fef2a0ef7c2cb0a80d6b68..01c96c092220aec9b8b5d9b06d711884342c15f8 100644 (file)
@@ -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
                }
        }