Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCM-5340: Add CSP header with nonce for next generated inline scripts #144

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ClareJonesBJSS
Copy link

Description

Adds CSP to headers via middleware

Context

Reflects CSP added to web-gateway at NHSDigital/nhs-notify-web-gateway#41, but nextjs generates inline scripts, so the header needs to be generated at this level so a nonce can be added

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@ClareJonesBJSS ClareJonesBJSS requested a review from a team as a code owner January 16, 2025 09:26
@alexnuttall alexnuttall force-pushed the feature/CCM-5340_csp-header branch from 2e9cdd8 to a0da4fc Compare January 16, 2025 16:13
@alexnuttall alexnuttall requested a review from a team as a code owner January 16, 2025 16:18
@alexnuttall alexnuttall force-pushed the feature/CCM-5340_csp-header branch from e14a350 to 2cfe6d9 Compare January 17, 2025 13:00
@alexnuttall alexnuttall force-pushed the feature/CCM-5340_csp-header branch from 58a576d to 1a65762 Compare January 28, 2025 16:36
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