Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates Content Security Policy (CSP) configuration by removing the duplicate CSP headers from next.config.mjs and updating the existing middleware CSP to support Google reCAPTCHA for the newsletter form.
- Removed the CSP configuration from
next.config.mjsto avoid duplication with middleware - Added Google reCAPTCHA domains to
script-src,frame-src, andimg-srcdirectives in middleware - Added Google domain variants to
img-srcfor reCAPTCHA image assets
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/frontend/next.config.mjs | Removed duplicate CSP headers configuration that conflicted with middleware implementation |
| apps/frontend/middleware.ts | Updated CSP directives to include Google reCAPTCHA URLs for script execution, iframe embedding, and image loading |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| connect-src *.google-analytics.com https://clerk.codemod.com https://api.short.io https://backend.codemod.com https://codemod.com https://vitals.vercel-insights.com https://summary-walrus-25.clerk.accounts.dev https://*.vercel.app https://vercel.live wss://backend.codemod.com wss://*.api.sanity.io ${codehikeUrls} ${analyticsUrls}; | ||
| style-src 'self' 'unsafe-inline' https://vercel.live; | ||
| img-src 'self' blob: data: https://*.google-analytics.com https://*.googletagmanager.com https://img.clerk.com https://cdn.sanity.io https://image.mux.com https://vercel.com https://avatars.githubusercontent.com; | ||
| img-src 'self' blob: data: https://*.google-analytics.com https://*.googletagmanager.com https://www.google.com https://www.google.com.eg https://*.google.com https://*.google.com.eg https://img.clerk.com https://cdn.sanity.io https://image.mux.com https://vercel.com https://avatars.githubusercontent.com; |
There was a problem hiding this comment.
The img-src directive includes redundant Google domains. https://*.google.com already covers https://www.google.com, and https://*.google.com.eg already covers https://www.google.com.eg. Consider removing the redundant specific domains to simplify the CSP policy.
| img-src 'self' blob: data: https://*.google-analytics.com https://*.googletagmanager.com https://www.google.com https://www.google.com.eg https://*.google.com https://*.google.com.eg https://img.clerk.com https://cdn.sanity.io https://image.mux.com https://vercel.com https://avatars.githubusercontent.com; | |
| img-src 'self' blob: data: https://*.google-analytics.com https://*.googletagmanager.com https://*.google.com https://*.google.com.eg https://img.clerk.com https://cdn.sanity.io https://image.mux.com https://vercel.com https://avatars.githubusercontent.com; |
936b648 to
a20d519
Compare
fixes newsletter form security policy