Add no-cache for all GET API requests
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@
|
||||
0, location.pathname.lastIndexOf("/")
|
||||
);
|
||||
|
||||
fetch(`${baseUrl}/api/devices`)
|
||||
fetch(`${baseUrl}/api/devices`, {cache: 'no-cache'})
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
document.querySelector("body > table > tbody").innerHTML =
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@
|
||||
0, location.pathname.lastIndexOf("/")
|
||||
);
|
||||
|
||||
fetch(`${baseUrl}/api/homekit`)
|
||||
fetch(`${baseUrl}/api/homekit`, {cache: 'no-cache'})
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
document.querySelector("body > table > tbody").innerHTML =
|
||||
|
||||
+2
-2
@@ -133,7 +133,7 @@
|
||||
|
||||
function reload() {
|
||||
const url = new URL("api/streams", location.href);
|
||||
fetch(url).then(r => r.json()).then(data => {
|
||||
fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => {
|
||||
tbody.innerHTML = "";
|
||||
|
||||
for (const [name, value] of Object.entries(data)) {
|
||||
@@ -153,7 +153,7 @@
|
||||
}
|
||||
|
||||
const url = new URL("api", location.href);
|
||||
fetch(url).then(r => r.json()).then(data => {
|
||||
fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => {
|
||||
const info = document.querySelector(".info");
|
||||
info.innerText = `Version: ${data.version}, Config: ${data.config_path}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user