We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6808429 commit 40836bdCopy full SHA for 40836bd
1 file changed
system/HTTP/ContentSecurityPolicy.php
@@ -429,8 +429,8 @@ public function finalize(ResponseInterface $response)
429
{
430
if ($this->autoNonce) {
431
$this->generateNonces($response);
432
- } else {
433
- // If we're not auto-generating nonces, we should remove any nonce placeholders from the body to prevent them from being rendered.
+ } elseif (! $this->enabled()) {
+ // If autoNonce is disabled and CSP is not enabled, we should still remove any nonce tags from the body to prevent confusion.
434
$body = (string) $response->getBody();
435
436
if ($body !== '') {
0 commit comments