@@ -47,28 +47,63 @@ class ContentSecurityPolicy extends BaseConfig
|
||||
*
|
||||
* @var list<string>|string|null
|
||||
*/
|
||||
public $defaultSrc;
|
||||
public $defaultSrc = 'self';
|
||||
|
||||
/**
|
||||
* Lists allowed scripts' URLs.
|
||||
*
|
||||
* @var list<string>|string
|
||||
*/
|
||||
public $scriptSrc = 'self';
|
||||
public $scriptSrc = [
|
||||
'self',
|
||||
'unsafe-inline',
|
||||
'https://cdn.jsdelivr.net',
|
||||
'https://code.jquery.com',
|
||||
'https://cdnjs.cloudflare.com',
|
||||
];
|
||||
|
||||
/**
|
||||
* Lists allowed stylesheets' URLs.
|
||||
*
|
||||
* @var list<string>|string
|
||||
*/
|
||||
public $styleSrc = 'self';
|
||||
public $styleSrc = [
|
||||
'self',
|
||||
'unsafe-inline',
|
||||
'https://cdn.jsdelivr.net',
|
||||
'https://fonts.googleapis.com',
|
||||
'https://cdnjs.cloudflare.com',
|
||||
];
|
||||
|
||||
/**
|
||||
* Lists allowed stylesheet element URLs.
|
||||
*
|
||||
* @var list<string>|string
|
||||
*/
|
||||
public $styleSrcElem = [
|
||||
'self',
|
||||
'unsafe-inline',
|
||||
'https://cdn.jsdelivr.net',
|
||||
'https://fonts.googleapis.com',
|
||||
'https://cdnjs.cloudflare.com',
|
||||
];
|
||||
|
||||
/**
|
||||
* Allows inline style attributes used by legacy views.
|
||||
*
|
||||
* @var list<string>|string
|
||||
*/
|
||||
public $styleSrcAttr = [
|
||||
'self',
|
||||
'unsafe-inline',
|
||||
];
|
||||
|
||||
/**
|
||||
* Defines the origins from which images can be loaded.
|
||||
*
|
||||
* @var list<string>|string
|
||||
*/
|
||||
public $imageSrc = 'self';
|
||||
public $imageSrc = ['self', 'data:', 'https:'];
|
||||
|
||||
/**
|
||||
* Restricts the URLs that can appear in a page's `<base>` element.
|
||||
@@ -99,7 +134,13 @@ class ContentSecurityPolicy extends BaseConfig
|
||||
*
|
||||
* @var list<string>|string
|
||||
*/
|
||||
public $fontSrc;
|
||||
public $fontSrc = [
|
||||
'self',
|
||||
'data:',
|
||||
'https://fonts.gstatic.com',
|
||||
'https://cdn.jsdelivr.net',
|
||||
'https://cdnjs.cloudflare.com',
|
||||
];
|
||||
|
||||
/**
|
||||
* Lists valid endpoints for submission from `<form>` tags.
|
||||
|
||||
Reference in New Issue
Block a user