Block JS loaded from external sources

This commit is contained in:
Jamie Cameron
2014-01-23 11:16:54 -08:00
parent 50d742550e
commit d694e8c685

View File

@@ -746,7 +746,12 @@ if ($pragma_no_cache || $gconfig{'pragma_no_cache'}) {
print "Cache-Control: no-store, no-cache, must-revalidate\n";
print "Cache-Control: post-check=0, pre-check=0\n";
}
print "X-Frame-Options: SAMEORIGIN\n";
if (!$gconfig{'no_frame_options'}) {
print "X-Frame-Options: SAMEORIGIN\n";
}
if (!$gconfig{'no_content_security_policy'}) {
print "Content-Security-Policy: script-src 'self' 'unsafe-inline'\n";
}
if (defined($_[0])) {
print "Content-type: text/html; Charset=$_[0]\n\n";
}