Skip to content

Commit

Permalink
🐛 autodetect and disable in panel/api was broken
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Apr 23, 2021
1 parent ff39a46 commit 8a14d7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/SecurityHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
},
Expand Down

0 comments on commit 8a14d7b

Please sign in to comment.