Skip to content

Add a Content-Security-Policy - #176

Merged
soulgalore merged 1 commit into
mainfrom
add-content-security-policy
Oct 21, 2026
Merged

soulgalore merged 1 commit into
mainfrom
add-content-security-policy

Conversation

@soulgalore

Copy link
Copy Markdown
Member

Error messages and config comments are now plain text, but nothing stopped injected markup from running script if a new injection point appears. A CSP that allows only scripts from the site itself closes that whole class of bug.

That meant moving the start-up code out of index.html and replacing the inline onclick/onchange/oninput handlers with data-action attributes and one delegated listener. HARs, screenshots and videos can still be loaded from any origin. A test fails if inline scripts or handlers come back.

The obsolete X-XSS-Protection and FLoC opt-out headers are removed.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com

Error messages and config comments are now plain text, but nothing
stopped injected markup from running script if a new injection point
appears. A CSP that allows only scripts from the site itself closes
that whole class of bug.

That meant moving the start-up code out of index.html and replacing
the inline onclick/onchange/oninput handlers with data-action
attributes and one delegated listener. HARs, screenshots and videos
can still be loaded from any origin. A test fails if inline scripts or
handlers come back.

The obsolete X-XSS-Protection and FLoC opt-out headers are removed.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com
@soulgalore
soulgalore merged commit 5832e43 into main Oct 21, 2026
1 check passed
@soulgalore
soulgalore deleted the add-content-security-policy branch October 21, 2026 04:19
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