After configuring a CDN, Liferay does not load images and throws error in browser console

Issue

  • We have configured a CDN with our Liferay environment.
  • The portal is unable to load Liferay JS/CSS and images and we see errors in the browser console:
Access to XMLHttpRequest at 'https...(CDN)' from origin 'https...(liferay)' has been blocked by CORS policy. No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

Environment

  • Liferay DXP 7.4

 

Resolution

  • Cross-Origin Resource Sharing (CORS) needs to be enabled in the CDN's configuration to allow access from Liferay.
  • Please refer to the resources available from the CDN's provider.

 

Additional Information

Was this article helpful?
1 out of 1 found this helpful