mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some CSP tuning.
This commit is contained in:
parent
c55bfc0b8c
commit
5da8b2ec9e
@ -53,7 +53,7 @@ class SecureHeaders
|
|||||||
$csp = [
|
$csp = [
|
||||||
"default-src 'none'",
|
"default-src 'none'",
|
||||||
"object-src 'self'",
|
"object-src 'self'",
|
||||||
sprintf("script-src 'unsafe-inline' %s 'nonce-%s'", $googleScriptSrc, $nonce),
|
sprintf("script-src 'unsafe-inline' 'nonce-%1s' %2s", $nonce, $googleScriptSrc),
|
||||||
"style-src 'self' 'unsafe-inline'",
|
"style-src 'self' 'unsafe-inline'",
|
||||||
"base-uri 'self'",
|
"base-uri 'self'",
|
||||||
"font-src 'self' data:",
|
"font-src 'self' data:",
|
||||||
@ -105,7 +105,7 @@ class SecureHeaders
|
|||||||
private function getGoogleImgSource(): string
|
private function getGoogleImgSource(): string
|
||||||
{
|
{
|
||||||
if ('' !== config('firefly.analytics_id')) {
|
if ('' !== config('firefly.analytics_id')) {
|
||||||
return 'https://www.google-analytics.com/';
|
return 'https://www.google-analytics.com';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
@ -119,7 +119,7 @@ class SecureHeaders
|
|||||||
private function getGoogleScriptSource(): string
|
private function getGoogleScriptSource(): string
|
||||||
{
|
{
|
||||||
if ('' !== config('firefly.analytics_id')) {
|
if ('' !== config('firefly.analytics_id')) {
|
||||||
return 'https://www.googletagmanager.com/gtag/js https://www.google-analytics.com/analytics.js';
|
return 'https://www.googletagmanager.com https://www.google-analytics.com';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
Reference in New Issue
Block a user