We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 29b642e + 2ebe2be commit 1fe4979Copy full SHA for 1fe4979
include/setup.php
@@ -70,6 +70,11 @@ function print_stack_trace() {
70
ini_set('session.use_trans_sid',1);
71
}
72
73
+// Check for non-embeddable pages and declare appropriate CSP
74
+if ( preg_match('/(\/admin\/|\/login)/i', $_SERVER['REQUEST_URI']) ) {
75
+ header("Content-Security-Policy: frame-ancestors 'self';");
76
+}
77
+
78
if ( ! isset($CFG->staticroot) ) die_with_error_log('$CFG->staticroot not defined in config.php');
79
if ( ! isset($CFG->timezone) ) die_with_error_log('$CFG->timezone not defined in config.php');
80
if ( strpos($CFG->dbprefix, ' ') !== false ) die_with_error_log('$CFG->dbprefix cannot have spaces in it');
0 commit comments