diff --git a/config.yaml.example b/config.yaml.example index 0383ec7..222bd9d 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -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 diff --git a/src/engine/skin/FeaturedSkin.php b/src/engine/skin/FeaturedSkin.php index 163551a..41281a8 100644 --- a/src/engine/skin/FeaturedSkin.php +++ b/src/engine/skin/FeaturedSkin.php @@ -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)).'"';