Commit 1e5fc01b authored by Matija Obreza's avatar Matija Obreza
Browse files

AppVersion: Avoid browser cache by using timestamp to fetch /COMMITHASH


Signed-off-by: Matija Obreza's avatarMatija Obreza <matija.obreza@croptrust.org>
parent 2a69d860
......@@ -6,8 +6,9 @@ export default class AppVersionService {
public static getSoftwareVersion = () => {
const virtualPath = document.baseURI.replace(/^(https?:\/\/[^\/]+)?(.*)\/$/, '$2');
const timestamp = new Date().getTime();
return axios.get(`${virtualPath}${SOFTWARE_VERSION_URL}`)
return axios.get(`${virtualPath}${SOFTWARE_VERSION_URL}?${timestamp}`)
.then(({ data }) => data as string);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment