Skip to content

fix: omit empty CSP headers#10412

Merged
michalsn merged 1 commit into
codeigniter4:developfrom
michalsn:fix/csp-omit-empty
Jul 17, 2026
Merged

fix: omit empty CSP headers#10412
michalsn merged 1 commit into
codeigniter4:developfrom
michalsn:fix/csp-omit-empty

Conversation

@michalsn

Copy link
Copy Markdown
Member

Description
This PR fixes a bug where empty CSP and Reporting-Endpoints headers were generated when no corresponding values existed.

Fixes #10410

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label Jul 16, 2026
@michalsn
michalsn merged commit e5719b5 into codeigniter4:develop Jul 17, 2026
57 checks passed
@michalsn

Copy link
Copy Markdown
Member Author

Thank you for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Empty Contet-Security-Policy-Report-Only header is created.

3 participants