Skip to content

Commit

Permalink
🐛 disabling seed
Browse files Browse the repository at this point in the history
  • Loading branch information
bnomei committed Feb 2, 2025
1 parent 3491780 commit d0158d2
Show file tree
Hide file tree
Showing 3 changed files with 519 additions and 395 deletions.
7 changes: 6 additions & 1 deletion classes/SecurityHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ public function loadFromFile(string $data): mixed

public function addNonceForSelf(): void
{
if ($seed = strval($this->option('seed'))) {
$seed = $this->option('seed');
if (! $seed || ! is_string($seed)) {
return;
}
$seed = trim($seed);
if (! empty($seed)) {
$nonce = $this->setNonce($seed);
$this->cspBuilder->nonce('script-src', $nonce);
$this->cspBuilder->nonce('style-src', $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": "5.0.1",
"version": "5.0.2",
"license": "MIT",
"description": "Kirby Plugin for easier Security Headers setup",
"authors": [
Expand Down
Loading

0 comments on commit d0158d2

Please sign in to comment.