mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add security headers for non-CLI execution
Add security headers conditionally for non-CLI requests
This commit is contained in:
@@ -89,11 +89,13 @@
|
||||
$database = database::new(['config' => $config]);
|
||||
|
||||
//security headers
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("Content-Security-Policy: frame-ancestors 'self';");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||
//header("Strict-Transport-Security: max-age=63072000; includeSubDomains; preload");
|
||||
if (!defined('STDIN')) {
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("Content-Security-Policy: frame-ancestors 'self';");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||
//header("Strict-Transport-Security: max-age=63072000; includeSubDomains; preload");
|
||||
}
|
||||
|
||||
//start the session if not using the command line
|
||||
global $no_session;
|
||||
|
||||
Reference in New Issue
Block a user