skin: move enable_assets_integrity option to config
This commit is contained in:
parent
bcbd721f7f
commit
ce2f9058dc
@ -37,6 +37,7 @@ wiki_root: wiki
|
||||
|
||||
skin_cache_prod_dir: replace_with_path_twig_cache_dir_on_prod
|
||||
skin_cache_dev_dir: replace_with_path_twig_cache_dir_on_dev
|
||||
enable_assets_integrity: yes
|
||||
|
||||
git_repo: git@github.com:example/example_org.git
|
||||
|
||||
|
@ -294,7 +294,8 @@ HTML;
|
||||
}
|
||||
|
||||
protected function getStaticIntegrityAttribute(string $name): string {
|
||||
if (isDev() || !isset($_GET['__enable_assets_integrity']))
|
||||
global $config;
|
||||
if (isDev() || !$config['enable_assets_integrity'])
|
||||
return '';
|
||||
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)).'"';
|
||||
|
Loading…
x
Reference in New Issue
Block a user