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
Conteúdo Excluesivo para Assinantes
Uma Subscrição do Liferay Enterprise fornece acesso a mais de 1.500 artigos que incluem práticas recomendadas, solução de problemas e outras soluções valiosas. Faça login para obter acesso completo.
Entrar