Closed Shamilik closed 2 years ago
Hi @Shamilik
I will also draft a bug template with a checklist tailored to Next+CSP-related bugs.
I am closing this, as the font optimization thing can't be handled automatically and needs the workaround
For the script issues: I am going to release 0.10.1
now (#70). I fixed some bugs with middleware that could break CSP, but those happened on Vercel only.
I also recorded a basic click-through test of the e2e app with Safari+strict-dynamic on a iPad Pro Device (https://github.com/nibtime/next-safe-middleware/pull/69#issuecomment-1206544255) and couldn't spot any issue there, also not in the docs project.
Can this be added in big red letters in documentation? I spent hours searching why I am getting inline style errors, only to discover the fonts are auto-inlined.
Do you pass nonce to
(as nextjs recommends)? If yes, then the issue is on nextjs team, as they should be passing this down to inlined styleYou can disable font-optimization by adding optimizeFonts: false,
to nextjs.config
https://nextjs.org/docs/basic-features/font-optimization
Optimised font isn't listed in CSP in Safari & Chrome
https://nextjs.org/docs/basic-features/font-optimization
Also there is some problem with scripts, but I still didn't realise what exactly.