]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12258 Don't use cache on DocsVersions.json
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 2 Jan 2020 14:39:14 +0000 (15:39 +0100)
committerSonarTech <sonartech@sonarsource.com>
Wed, 8 Jan 2020 19:46:11 +0000 (20:46 +0100)
server/sonar-docs/src/components/Sidebar.tsx

index c27bd513186bb31670061fa06da05c75011c66b5..6f95568bcb14d8e2fa555cdac08ae7647d3935fe 100644 (file)
@@ -78,7 +78,11 @@ export default class Sidebar extends React.PureComponent<Props, State> {
   }
 
   loadVersions() {
-    fetch('/DocsVersions.json')
+    const headers = new Headers([
+      ['Cache-Control', 'no-cache'],
+      ['Pragma', 'no-cache']
+    ]);
+    fetch('/DocsVersions.json', { headers })
       .then(response => response.json())
       .then(json => {
         this.setState({ loaded: true, versions: json });