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
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión