Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-16225

Swagger UI caching causing load problems on upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.0, 3.7.0, 3.8.0
    • Fix Version/s: 3.12.0
    • Component/s: REST, UI
    • Labels:
      None
    • Story Points:
      2

      Description

      URLs to load parts of the swagger-ui via the http://localhost:8081/#admin/system/api link do not include the typical cache busting mechanism employed by other URLS ?_v=<productversion>. The URLs include a Cache-Control: max-age=2592000 header in the response which causes the generic URL content to be cached for 30 days in the browser.

      We have had several reports of problems loading the in product swagger-ui because of this caching issue.

      Request
      GET /swagger-ui/ HTTP/1.1
      Host: localhost:8081
      Connection: keep-alive
      Upgrade-Insecure-Requests: 1
      User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
      Referer: http://localhost:8081/
      Accept-Encoding: gzip, deflate, br
      Accept-Language: en-US,en;q=0.9
      Cookie: NXSESSIONID=b1639abe-c8f8-4e43-b1dc-04828c8713f2
      
      Response
      HTTP/1.1 200 OK
      Date: Fri, 16 Feb 2018 13:45:06 GMT
      Server: Nexus/3.8.0-02 (PRO)
      X-Frame-Options: SAMEORIGIN
      X-Content-Type-Options: nosniff
      Content-Type: text/html
      Last-Modified: Fri, 02 Feb 2018 00:56:55 GMT
      Cache-Control: max-age=2592000
      Content-Length: 4393
      

      The broken interface leads to support tickets and users mailing list questions.

      Expected

      Include cache buster query param in all UI URLs. UI users should not be forced to clear browser cache and restart their browsers on upgrading Nexus.

      Workaround

      Clear browser cache and restart web browsers after upgrading Nexus. Some reports of force refreshing using CTRL-F5 have worked as well.

        Attachments

        1. 2018-05-11_1407.png
          2018-05-11_1407.png
          131 kB
        2. broken-ui.png
          broken-ui.png
          196 kB
        3. broken-ui-3.7.1.png
          broken-ui-3.7.1.png
          206 kB

          Activity

            People

            Assignee:
            mpiggott Matthew Piggott
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch
            Team:
            Nexus - UX
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title