From 792af2ae5ea0bdc993ef0d9291d1b1cf477042a0 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 8 Sep 2023 10:49:31 +0200 Subject: [PATCH] Introduce class `ipl\Web\Compat\StyleWithNonce` --- src/Compat/StyleWithNonce.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Compat/StyleWithNonce.php diff --git a/src/Compat/StyleWithNonce.php b/src/Compat/StyleWithNonce.php new file mode 100644 index 00000000..f4c71851 --- /dev/null +++ b/src/Compat/StyleWithNonce.php @@ -0,0 +1,25 @@ +nonce === null) { + $this->nonce = version_compare(Version::VERSION, '2.12.0', '>=') + ? Csp::getStyleNonce() ?? '' + : ''; + } + + return parent::getNonce(); + } +}