skin: enable integrity attributes conditionally

This commit is contained in:
E. S. 2025-05-15 16:57:05 +03:00
parent 30f841c5f8
commit bcbd721f7f

View File

@ -294,7 +294,7 @@ HTML;
}
protected function getStaticIntegrityAttribute(string $name): string {
if (isDev() || true)
if (isDev() || !isset($_GET['__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)).'"';