Skip to content

chore: deduplicate repeated CSP directive handling#16498

Open
Nic-Polumeyv wants to merge 4 commits into
sveltejs:version-3from
Nic-Polumeyv:csp-unsafe-inline-helper
Open

chore: deduplicate repeated CSP directive handling#16498
Nic-Polumeyv wants to merge 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
Contributor

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.

@pkg-svelte-dev

pkg-svelte-dev Bot 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.

@changeset-bot

changeset-bot Bot 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

@Nic-Polumeyv Nic-Polumeyv changed the title chore: deduplicate dev-mode unsafe-inline injection in CSP chore: deduplicate repeated CSP directive handling Jul 24, 2026
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.

1 participant