cancel
Showing results for 
Search instead for 
Did you mean: 

CDN and CORS Policy

CDN and CORS Policy

Hi,

I've just configured Magento 2.4.1 website with KeyCDN.

Using Nginx as webserver.

 

I have errors when loading pages : Access to XMLHttpRequest at 'https://xxx.kxcdn.com/static/version1617307814/frontend/xxx/fr_FR/Magento_Ui/templates/modal/modal-s...' from origin 'https://dev.xxx.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

av01.png

 

CORS is enable on KeyCDN side.

I'm not able to make it working preperly, whatever the configuration I'm trying out in NGINX configuration...

 

Could someone help me?

 

Thanks,

Thomas

 

 

 

1 REPLY 1

Re: CDN and CORS Policy

Reference this document - https://www.keycdn.com/blog/cors-cdn

 

I used KeyCDN with Magento about a year ago. It's a good product. However, I moved to Cloudflare since it also offers a WAF (Web Application Firewall) in addition to CDN functionality.