Skip to content

fix(headers): add ssg hashes for script-src-elem and style-src-elem#659

Merged
Baroshem merged 1 commit intoBaroshem:chore/2.5.0from
dargmuesli:fix/headers/src-elem
Nov 14, 2025
Merged

fix(headers): add ssg hashes for script-src-elem and style-src-elem#659
Baroshem merged 1 commit intoBaroshem:chore/2.5.0from
dargmuesli:fix/headers/src-elem

Conversation

@dargmuesli
Copy link
Copy Markdown
Contributor

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

I'm using script-src-elem instead of script-src, but SSG hashes are only added to the latter and then dropped because script-src-elem takes precedence. Thus, my CSP ends up with no script hashes at all.
This PR allows script-src-elem to accept hashes aswell and adds a test for that.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 12, 2025

@dargmuesli is attempting to deploy a commit to the Baroshem's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

@Baroshem Baroshem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!

@Baroshem Baroshem changed the base branch from main to chore/2.5.0 November 14, 2025 12:59
@Baroshem Baroshem merged commit b05ea96 into Baroshem:chore/2.5.0 Nov 14, 2025
3 of 4 checks passed
@dargmuesli dargmuesli deleted the fix/headers/src-elem branch November 15, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants