From ff39a46fab46e88d21ff1d184a7cedf073a0803d Mon Sep 17 00:00:00 2001 From: Bruno Meilick Date: Fri, 23 Apr 2021 19:10:49 +0100 Subject: [PATCH] :bug: allow null from nonce Signed-off-by: Bruno Meilick --- composer.json | 2 +- index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2a444d0..8f961bd 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "bnomei/kirby3-security-headers", "type": "kirby-plugin", - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "description": "Kirby 3 Plugin for easier Security Headers setup", "authors": [ diff --git a/index.php b/index.php index ca8b036..6678f15 100644 --- a/index.php +++ b/index.php @@ -86,7 +86,7 @@ }, ], 'pageMethods' => [ - 'nonce' => function (string $key): string { + 'nonce' => function (string $key): ?string { return \Bnomei\SecurityHeaders::singleton()->getNonce($key); }, 'nonceAttr' => function (string $key): string {