Fixdd additonal issues identified by Davidson CI
This commit is contained in:
+21
@@ -1,6 +1,27 @@
|
||||
<?php
|
||||
function send_app_csp_header(): void
|
||||
{
|
||||
if (headers_sent()) {
|
||||
return;
|
||||
}
|
||||
|
||||
header('Content-Security-Policy: ' . implode(' ', [
|
||||
"script-src 'self' 'unsafe-inline' https://unpkg.com https://cdn.paddle.com;",
|
||||
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;",
|
||||
"font-src https://fonts.gstatic.com;",
|
||||
"img-src 'self' data:;",
|
||||
"connect-src 'self' https://cdn.paddle.com https://api.paddle.com https://sandbox-api.paddle.com;",
|
||||
"frame-src https://buy.paddle.com https://sandbox-buy.paddle.com;",
|
||||
"object-src 'none';",
|
||||
"base-uri 'self';",
|
||||
"frame-ancestors 'none';",
|
||||
]), true, 0);
|
||||
}
|
||||
|
||||
function start_app_session(): void
|
||||
{
|
||||
send_app_csp_header();
|
||||
|
||||
if (session_status() === PHP_SESSION_ACTIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user