-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Idea
Add a web.frontend.SecurityHeaders
API to cover all of: X-Content-Type-Options ✅, Content-Security-Policy, X-Frame-Options, Referrer-Policy and Permissions-Policy, e.g. as follows:
new SecurityHeaders(
csp: "default-src 'none'; ...",
framing: 'DENY', // or: ALLOW, SAMEORIGIN, ALLOW-FROM [URL]
referrers: 'no-referrer-when-downgrade', // or: strict-origin, origin-when-cross-origin, etcetera
permissions: '...'
);
- Check how to add easy report-only modes for csp and permissions
- Check how a
nonce
-notation would work - Make framing and referrers accessible via enums
- Check what could be sensible defaults?
- ...and if we can find defaults, add these to the frontend and then make them customizable via
$frontend->security()->csp(...)
instead of always having to add these manually
See https://securityheaders.com/?q=https%3A%2F%2Fdialog.sloppy.zone%2F
Inspired by
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed