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

Failed /api/jsonws/ calls when using portal.proxy.path

Details

    Description

      Description
      Liferay JSON Web Services API calls no longer work, when the portal property: portal.proxy.path is configured.

      Steps to reproduce

      1. Configure a reverse proxy (e.g. using Apache)
        <VirtualHost *:80>
          ServerName localhost
          ProxyPreserveHost On
          <location /portal>
            ProxyPass "http://localhost:8080"
            ProxyPassReverse "http://localhost:8080"
          </location>
        </VirtualHost>
        
      2. Prepare a clean bundle with the following portal property:
        portal.proxy.path=/portal
        
        web.server.http.port=80
        
      3. Start Liferay
      4. Navigate to http://localhost/portal
        • Login as admin user
      5. Navigate to http://localhost/portal/api/jsonws
        1. Click get-companies under COMPANY
        2. Click Invoke

      Expected results
      Result displays an array with the default company as an entry, example:

      [
        {
          "active": true,
          "companyId": "20097",
          "createDate": 1656362181077,
          "homeURL": "",
          "industry": "",
          "legalId": "",
          "legalName": "",
          "legalType": "",
          "logoId": "0",
          "maxUsers": 0,
          "modifiedDate": 1656362181077,
          "mvccVersion": "1",
          "mx": "liferay.com",
          "name": "Liferay",
          "sicCode": "",
          "size": "",
          "system": false,
          "tickerSymbol": "",
          "type": "",
          "userId": "0",
          "userName": "",
          "webId": "liferay.com"
        }
      ] 

      Actual results
      Result displays empty results and a 403 is thrown for the invoked request, example:

      {} 

      Attachments

        Issue Links

          Activity

            People

              stian.sigvartsen Stian Sigvartsen
              eric.yan Eric Yan
              Rafaela Nascimento Rafaela Nascimento
              Eric Yan Eric Yan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                43 weeks, 2 days ago

                Packages

                  Version Package
                  7.3.10 DXP U24
                  7.3.X
                  7.4.3.36 CE GA36
                  7.4.3.37 CE GA37
                  Master