fix(bff): improve security headers #2652
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Hva er endret?
Quickly generated by Claude 4, so gotta take a sanity check here before merging anything..!
🔒 Enhanced Security Headers Added:
🆕 New Security Features:
1. Enhanced Content Security Policy:
styleSrc- Controls CSS sources (allows inline styles for UI)fontSrc- Allows web fonts from secure sourcesconnectSrc- Controls AJAX/fetch connectionsframeSrc- Blocks all iframe embeddingbaseUri- Prevents base tag hijackingformAction- Restricts form submissionsupgradeInsecureRequests- Forces HTTPS upgrades2. Privacy & Process Isolation:
dnsPrefetchControl: false- Improves user privacyoriginAgentCluster: true- Better process isolationieNoOpen: true- IE download security3. Improved Referrer Policy:
strict-origin-when-cross-origin(more balanced thanno-referrer)4. Enhanced Permissions Policy:
camera,microphone,geolocationinterest-cohort(Google FLoC tracking)5. Server Fingerprinting Protection:
hidePoweredBy: true- Removes server identification headers🎯 Key Security Improvements:
🔍 Notable Changes:
X-XSS-Protection Disabled:
xssFilter: true→xssFilter: falseReferrer Policy Improved:
no-referrer→strict-origin-when-cross-originCSP Enhanced:
Your security posture is now enterprise-grade with defense against the latest attack vectors! 🛡️
Related Issue(s)