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

request.getContextPath() does not take into account Proxies

    Details

      Description

      While request.getContextPath() is being used correctly, it does not take into account Proxy paths, such as portal.proxy.path=

      This will mostly affect plugins because they will not be properly rendered when accessing Liferay via proxy.

      One example is the chat portlet view.jsp:

       <liferay-util:html-top>
        <link href="<%= PortalUtil.getStaticResourceURL(request, request.getContextPath() + "/css/main.css", portlet.getTimestamp()) %>" rel="stylesheet" type="text/css" />
       </liferay-util:html-top>
      
       <liferay-util:html-bottom>
        <script defer="defer" src="<%= PortalUtil.getStaticResourceURL(request, request.getContextPath() + "/js/main.js", portlet.getTimestamp()) %>" type="text/javascript"></script>
       </liferay-util:html-bottom>
      

      The URL's don't take the proxy path into account.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 37 weeks, 2 days ago

                Packages

                Version Package
                6.1.X EE
                6.2.0 CE RC2