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
- Configuring Liferay DXP to Use a CDN
- On Liferay side, the CORS settings are available here: Setting up CORS
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In