Wordpress LScache Plugin: CORS policy not working
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello. 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 dont load in any way. For example, my site is http://www.thepetsmedia.com and I am using a subdomain cdn0.thepetsmedia.com 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 https://cdn0.thepetsmedia.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?17’ from origin https://www.thepetsmedia.com’ 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. Hi, Are you using OpenLiteSpeed ? If that is the case, please check this doc Best regards, I followed the instructions described there. Now, my problems have been partially solved. But still, the fonts are not loading properly. It seems that the .woff or .woff2 fonts are failing to load but .ttf fonts are loading fine now. How do I solve this particular issue? I am using Cyberpanel based on Openlitespeed. Thanks a lot for your prompt support! Hi, Its due to your CF purge do a purge all in CF Best regards, It is still not working. I have tried all these separately: https://openlitespeed.org/kb/how-to-set-up-custom-headers/ https://openlitespeed.org/kb/setting-up-cors-on-openlitespeed/ https://openlitespeed.org/mediawiki/index.php/Help:CORS_Setup None of these seems to be working. And there are differences among the URI and Location. If possible, would you please specify the URI and Location? I am using multiple WordPress sites through CyberPanel and OpenLitespeed. Hi, You have already had the CORS header on fonts [root@test ]# curl -I -XGET https://static.thepetsmedia.com/wp-content/themes/Newspaper/images/icons/newspaper.woff HTTP/1.1 200 OK Content-Type: application/font-woff Content-Length: 123604 Connection: keep-alive Date: Mon, 01 Jun 2020 17:36:34 GMT Expires: Sat, 28 Nov 2020 17:36:33 GMT ETag: 1e2d4-5ed44fa1-dc929 Last-Modified: Mon, 01 Jun 2020 00:45:21 GMT Cache-Control: public, max-age=15552000 Access-Control-Allow-Origin: Alt-Svc: h3-27=:443 ma=86400 CF-Cache-Status: MISS Accept-Ranges: bytes cf-request-id: 03128defde00000eaf091e3200000001 Expect-CT: max-age=604800, report-uri=https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct Server: cloudflare CF-RAY: 59cab292fdb10eaf-FRA X-Cache: Miss from cloudfront Via: 1.1 1d1fb1f8e5e923ef7208b5a427d25d5d.cloudfront.net (CloudFront) X-Amz-Cf-Pop: AMS54-C1 X-Amz-Cf-Id: HxWYamSMcm_tVtE1--Zw9LHqvNOd2zbKT1Vr37Z5xFk8dYpw03AIIQ==Expand Best regards, Yes, I have already solved this issue. There was an SSL issue and I accidentally missed to add the HTTP->HTTPS rewrite rules. Also, I followed this guide as well. https://openlitespeed.org/kb/how-to-set-up-custom-headers/ Thanks a lot for your assistance. Regards.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference