Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-24090

top_head.jsp references CDN Host when loading css.jsp

    Details

      Description

      If the cdn.host.http or cdn.host.https properties are defined in portal-ext.properties, the host is incorporated into the URL for loading css.jsp within top_head.jsp. Line 30 shows the following, which includes a call to getCDNHost():

      <link href="<%= HtmlUtil.escape(PortalUtil.getStaticResourceURL(request, themeDisplay.getCDNHost() + themeDisplay.getPathContext() + "/html/portal/css.jsp")) %>" rel="stylesheet" type="text/css" />

      This is not correct. There is no sense in putting a JSP file on the CDN, as it won't be processed. The logic should be updated to remove the call to getCDNHost() and just reference the file from the Liferay server.

      I have seen older tickets reported that are related to this (see LPS-12383), but it looks like these issues are only being addressed on a case-by-case basis. Given that this looks like the fourth or fifth such issue, would it make sense to do a deeper scan on all logic related to CDN usage, so we are sure that JSPs and other dynamic files aren't expected to be on the CDN?

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  7 years, 17 weeks ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2