engine/skin: add __enable_assets_integrity override
This commit is contained in:
parent
ee2e099d67
commit
15e8f55ea4
@ -295,7 +295,7 @@ HTML;
|
|||||||
|
|
||||||
protected function getStaticIntegrityAttribute(string $name): string {
|
protected function getStaticIntegrityAttribute(string $name): string {
|
||||||
global $config;
|
global $config;
|
||||||
if (isDev() || !$config['enable_assets_integrity'])
|
if (isDev() || (!$config['enable_assets_integrity'] && !isset($_GET['__enable_assets_integrity'])))
|
||||||
return '';
|
return '';
|
||||||
global $config, $globalContext;
|
global $config, $globalContext;
|
||||||
return ' integrity="'.implode(' ', array_map(fn($hash_type) => $hash_type.'-'.$config['assets'][$globalContext->project][$name]['integrity'][$hash_type], self::RESOURCE_INTEGRITY_HASHES)).'"';
|
return ' integrity="'.implode(' ', array_map(fn($hash_type) => $hash_type.'-'.$config['assets'][$globalContext->project][$name]['integrity'][$hash_type], self::RESOURCE_INTEGRITY_HASHES)).'"';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user