Skip to content

Conversation

@ndbroadbent
Copy link
Contributor

@ndbroadbent ndbroadbent commented Oct 3, 2025

Hello! Sorry I realized that I messed up the earlier attempt at CSP support. The nonce attribute has to be set BEFORE appending the element to the head, otherwise you still get CSP warnings about the style tag, even if it only contains a single space character or an empty string. After this change, the e2e test suite in my project runs 100% with no CSP errors.

I also added a test case, and was able to get the filesize limit back down to 1300B!

Thanks!

@vercel
Copy link

vercel bot commented Oct 3, 2025

@ndbroadbent is attempting to deploy a commit to the Cristian Bote's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 3, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@ndbroadbent ndbroadbent force-pushed the fix/further-csp-fix branch 5 times, most recently from 8b31e2d to fad9fcb Compare October 3, 2025 06:41
@cristianbote
Copy link
Owner

cristianbote commented Oct 3, 2025

Ah I see. No worries.

Size Change: -13 B (0%)

Total Size: 3.95 kB

Filename Size Change
dist/goober.esm.js 1.3 kB -4 B (0%)
dist/goober.modern.js 1.3 kB -4 B (0%)
dist/goober.umd.js 1.36 kB -5 B (0%)

@cristianbote cristianbote merged commit 44334ec into cristianbote:master Oct 3, 2025
6 of 7 checks passed
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