Next.js Discord

Discord Forum

CORS error loading external font file from Cloudflare CDN

Unanswered
Blue Lacy posted this in #help-forum
Open in Discord
Blue LacyOP
Next v14.2.3

Hello! I am using Cloudflare R2 to host some font files and a CSS file. That CSS file does not get blocked by CORS and loads properly.

However the font files themselves are then BLOCKED by CORS. They're font-face definitions within that style sheet. I've also tried loading them via a stylesheet within my Next app and they are still blocked.

I've adjusted the CORS details on Cloudflare to allow this origin (I know it works because the cas file is fetched okay)

The only other thing I can think of here is I need to add another config for NextJS to not block this request? Is this something Next might be doing?

0 Replies