Skip to content

chore: deduplicate repeated CSP directive handling - #16498

Merged
Rich-Harris merged 4 commits into
sveltejs:version-3from
Nic-Polumeyv:csp-unsafe-inline-helper
Jul 28, 2026
Merged

Rich-Harris merged 4 commits into
sveltejs:version-3from
Nic-Polumeyv:csp-unsafe-inline-helper

Conversation

@Nic-Polumeyv

@Nic-Polumeyv Nic-Polumeyv commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

This block was born triplicated in #11562, which had to rewrite all three sites #11485 touched two days earlier.

The report-only check parsed as ?.length ?? (0 > 0) and only worked because 0 and undefined are both falsy; the replacement has the same truth table.

ghost commented Jul 24, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from b26880d:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/b26880dcb35c8f40b74730981ecd2e9c33706e7c

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16498

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

ghost commented Jul 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b26880d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ghost ghost changed the title chore: deduplicate dev-mode unsafe-inline injection in CSP chore: deduplicate repeated CSP directive handling Jul 24, 2026

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you

@ghost
ghost merged commit 6942ddb into sveltejs:version-3 Jul 28, 2026
@ghost ghost mentioned this pull request Jul 28, 2026
@ghost
ghost deleted the csp-unsafe-inline-helper branch July 30, 2026 22:52
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