Content Delivery Network (CDN) configuration "cdn.dynamic.resources.enabled=false" is not working

Issue

  • After setting cdn.dynamic.resources.enabled=false, Liferay is still accessing some CSS and JavaScript from the CDN URLs configured in cdn.host.http= and cdn.host.https=

Environment

  • Liferay Portal
  • Liferay DXP

Resolution

  • If the properties cdn.host.http= and/or cdn.host.https= are set, then they will be used for static content (for HTTP and HTTPS respectively). The property cdn.dynamic.resources.enabled= does not disable these properties for static content, it only controls whether they will be user for dynamic content in addition to static content.
  • If you disable the first two properties as well, either by entering blank values for them or commenting them out in your portal-ext.properties, then Liferay will no longer load JavaScript or CSS from the CDN.
  • Note that in Liferay DXP 7.0+, these settings can also be configured in Control Panel > Configuration > Instance Settings > Configuration. If they are updated in the control panel, this setting will override any settings in your portal-ext.properties.
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助