]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move X-Frame-Options into PHP 4072/head
authorLukas Reschke <lukas@statuscode.ch>
Sun, 26 Mar 2017 15:24:50 +0000 (17:24 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Sun, 26 Mar 2017 15:26:11 +0000 (17:26 +0200)
The public calendar view should be embeddable and we can't do that if the .htaccess sets a global X-Frame-Options.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
.htaccess
lib/private/legacy/response.php

index 525ee3a0fb6ce3ab96a1e06b67d04735527fb068..7bf8759e38397a3440f33a4b0ecbfd01cfc63402 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -14,7 +14,6 @@
     Header set X-Content-Type-Options "nosniff"
     Header set X-XSS-Protection "1; mode=block"
     Header set X-Robots-Tag "none"
-    Header set X-Frame-Options "SAMEORIGIN"
     Header set X-Download-Options "noopen"
     Header set X-Permitted-Cross-Domain-Policies "none"
     SetEnv modHeadersAvailable true
index 69c84e2df6888c3315544a932704d5542558dcd0..8937b56a70704fa9f6d3b5b6b164d42ed1a48a37 100644 (file)
@@ -255,13 +255,13 @@ class OC_Response {
                        . 'media-src *; ' 
                        . 'connect-src *';
                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
                if(getenv('modHeadersAvailable') !== 'true') {
                        header('X-XSS-Protection: 1; mode=block'); // Enforce browser based XSS filters
                        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-Robots-Tag: none'); // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
                        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