CORS policy not working

I have been using Cyberpanel for almost all of my sites. And everything is going absolutely fine.
But, recently I happened to find an issue.
That is, when I try to implement CDN for my sites, the fonts don’t load in any way.
For example, my site is and I am using a subdomain as the CDN.
But whenever I enable CDN mapping and revisit my site, everything else loads just fine. But the fonts become broken and the icons get boxed.
I found out that it is a CORS problem when I looked at Inspect element=>Console=>

“Access to font at ‘’ from origin ‘’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

I have already tried adding the CORS header in the .htaccess file but no luck.
Can anyone please help me out here?
Thanks in advance.

This worked for me