guydumais / next-strict-csp

Hash-based Strict Content Security Policy generator for Next.js
23 stars 2 forks source link

Next.js appDir #7

Open r34son opened 10 months ago

r34son commented 10 months ago

Hi! Can i use your package with Next.js appDir?

r34son commented 10 months ago

I quess no =) https://nextjs.org/docs/app/building-your-application/upgrading/app-router-migration#step-3-migrating-nexthead

alvyynm commented 7 months ago

Hi @r34son, did you find a solid solution for setting strict CSP in Nextjs's app router? I've stumbled across a dedicated documentation page and it's nothing short of magic. Link below:

https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy

r34son commented 7 months ago

Hi, you can look at my solution here https://github.com/r34son/profile/blob/master/src/middleware.ts

cc @alvyynm

alvyynm commented 7 months ago

Thank you @r34son