diff --git a/core/js.php b/core/js.php index c344399..f779c64 100644 --- a/core/js.php +++ b/core/js.php @@ -4,6 +4,7 @@ use Asset; use f; +use c; use html; class JS extends \Kirby\Component\JS { @@ -51,7 +52,7 @@ public function tag($src, $async = false) { $attr = array( 'src' => url($src), 'integrity' => $jsIntegrity, // inject generated sri hash - 'crossorigin' => 'anonymous' + 'crossorigin' => c::get('sri-hash.use-credentials') ? 'use-credentials' : 'anonymous' // set user-defined 'crossorigin' attribute ); if(is_array($async)) {