Details
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.
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
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.