mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
33
html/phpmyad/libraries/header_http.inc.php
Normal file
33
html/phpmyad/libraries/header_http.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
|
||||
die(__("GLOBALS overwrite attempt"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends http headers
|
||||
*/
|
||||
$GLOBALS['now'] = gmdate('D, d M Y H:i:s') . ' GMT';
|
||||
/* Prevent against ClickJacking by allowing frames only from same origin */
|
||||
if (!$GLOBALS['cfg']['AllowThirdPartyFraming']) {
|
||||
header('X-Frame-Options: SAMEORIGIN');
|
||||
header('X-Content-Security-Policy: allow \'self\'; options inline-script eval-script; frame-ancestors \'self\'; img-src \'self\' data:; script-src \'self\' http://www.phpmyadmin.net');
|
||||
header('X-WebKit-CSP: default-src \'self\' \'unsafe-inline\'; img-src \'self\' data:; script-src \'self\' \'unsafe-inline\' \'unsafe-eval\' http://www.phpmyadmin.net');
|
||||
}
|
||||
PMA_no_cache_header();
|
||||
if (!defined('IS_TRANSFORMATION_WRAPPER')) {
|
||||
// Define the charset to be used
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user