fix(nextjs): remove redundant protection CSP source#9207
Conversation
🦋 Changeset detectedLatest commit: 4eb82e6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughWalkthroughThe Next.js CSP generator now uses a single Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
Description
The CSP generated by
clerkMiddleware()currently listshttps://*.protect.clerk.comandhttps://*.client.protect.clerk.comseparately forscript-src,connect-src, andframe-src.CSP wildcard source matching means
https://*.protect.clerk.comalready covers the nested client Protect hosts. This removes only the redundanthttps://*.client.protect.clerk.comsource while retaining the Protect-scoped wildcard.This follows up #9199 after its release in
@clerk/nextjs@7.5.21.Paired documentation update: https://github.com/clerk/clerk/pull/2986
Impact
Applications that use automatic Next.js CSP configuration retain
https://*.protect.clerk.comand no longer receive the redundant deeper client source. No application configuration changes are required.Testing
pnpm turbo build --filter=@clerk/nextjspnpm --filter @clerk/nextjs test(44 files, 471 tests)pnpm --filter @clerk/nextjs lint(passes with 18 existing warnings)pnpm --filter @clerk/nextjs format:checkpnpm changeset status --since origin/maingit diff --check