diff --git a/classes/SecurityHeaders.php b/classes/SecurityHeaders.php index 3dfa953..e51517b 100644 --- a/classes/SecurityHeaders.php +++ b/classes/SecurityHeaders.php @@ -36,7 +36,11 @@ public function __construct(array $options = []) kirby()->urls()->panel ) !== false; $panelHasNonces = method_exists(kirby()->system(), 'nonces'); - $enabled = !kirby()->system()->isLocal() && ($isPanel && $panelHasNonces); + + $enabled = !kirby()->system()->isLocal(); + if ($isPanel && !$panelHasNonces) { + $enabled = false; + } $defaults = [ 'debug' => option('debug'), diff --git a/composer.json b/composer.json index d38cf44..d916dfa 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "bnomei/kirby3-security-headers", "type": "kirby-plugin", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "description": "Kirby 3 Plugin for easier Security Headers setup", "authors": [