Skip to content

fix(jcasc): replace invalid CSP header attribute with enforce flag (weekly)#2187

Merged
gounthar merged 1 commit into
jenkins-docs:weeklyfrom
gounthar:fix/csp-jcasc-schema-weekly
Apr 21, 2026
Merged

fix(jcasc): replace invalid CSP header attribute with enforce flag (weekly)#2187
gounthar merged 1 commit into
jenkins-docs:weeklyfrom
gounthar:fix/csp-jcasc-schema-weekly

Conversation

@gounthar

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes a crash introduced by fix(codespaces): fix reverse proxy warning and enable CSP #2185 on the weekly branch
  • CspConfiguration in JCasc only accepts advanced and enforce attributes; the header key caused an UnknownAttributesException on startup, aborting the JCasc reload entirely
  • Replaces the broken multi-line header: block with enforce: true

This is the weekly backport of the same fix already merged to main via #2186.

Test plan

  • Build the simple_controller image from this branch and confirm Jenkins starts without JCasc errors in the log
  • Verify the CSP header is present in browser responses after startup

The CspConfiguration JCasc binding only supports `advanced` and
`enforce` attributes. The `header` key caused an UnknownAttributesException
on startup, crashing the JCasc reload and leaving Jenkins unconfigured.

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
@github-actions github-actions Bot added the repo label Apr 21, 2026
@gounthar gounthar merged commit e676697 into jenkins-docs:weekly Apr 21, 2026
3 checks passed
@gounthar gounthar deleted the fix/csp-jcasc-schema-weekly branch April 21, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant