CORS Error with Font Files After Setting Up CloudFront CDN in Nginx with Hestia

I am facing an issue where font files are not loading properly due to a CORS error. I have recently set up CloudFront CDN with my WordPress site hosted on a server running Nginx with Hestia.

The issue is that when CloudFront caches the font files, they are not loading correctly and I receive a CORS missing Access-Control-Allow-Origin header error in the browser console. However, when I bypass the CDN and access the font files directly from the server, they load fine.

You should consult CDN or WordPress. Thank you for your support of Hestia!

1 Like

Hi, How did you set up Cloud Front to work? I tested a lot and couldn’t get it to work on my Wordpress. Maybe I’m missing something. When I activate CDN I get a 502 error. I tested on other VPSs that are Lamp Stack or Open Lite Server and everything with my CDN on same site setting and files works. It seems there is something specific that blocks CDN in Hestia. Please help if you can.

Request Method

GET

Status Code

502 Bad Gateway

Referrer Policy

strict-origin-when-cross-origin