From 8a14d7b6d7595bad58ee164a006cbb1f8f5ed1b0 Mon Sep 17 00:00:00 2001 From: Bruno Meilick Date: Fri, 23 Apr 2021 19:47:10 +0100 Subject: [PATCH] :bug: autodetect and disable in panel/api was broken Signed-off-by: Bruno Meilick --- classes/SecurityHeaders.php | 2 +- composer.json | 2 +- index.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/SecurityHeaders.php b/classes/SecurityHeaders.php index fd732b9..b38cac6 100644 --- a/classes/SecurityHeaders.php +++ b/classes/SecurityHeaders.php @@ -37,7 +37,7 @@ public function __construct(array $options = []) ) !== false; $isApi = strpos( kirby()->request()->url()->toString(), - kirby()->urls()->panel() + kirby()->urls()->api() ) !== false; $panelHasNonces = method_exists(kirby(), 'nonce'); diff --git a/composer.json b/composer.json index 8f961bd..9cff800 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "bnomei/kirby3-security-headers", "type": "kirby-plugin", - "version": "2.4.1", + "version": "2.4.2", "license": "MIT", "description": "Kirby 3 Plugin for easier Security Headers setup", "authors": [ diff --git a/index.php b/index.php index 6678f15..82e358c 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ Kirby::plugin('bnomei/securityheaders', [ 'options' => [ - 'enabled' => true, + 'enabled' => null, // null => disable in panel and api 'seed' => function () { return Url::stripPath(site()->url()); },