mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-25 17:43:35 +05:00
refactor: added `no-cache`
This commit is contained in:
16
index.html
16
index.html
@@ -105,7 +105,9 @@
|
||||
try {
|
||||
fwVersion.disabled = true;
|
||||
|
||||
const response = await fetch("https://api.github.com/repos/Laxilef/OTGateway/releases");
|
||||
const response = await fetch("https://api.github.com/repos/Laxilef/OTGateway/releases", {
|
||||
cache: "no-cache"
|
||||
});
|
||||
const data = await response.json();
|
||||
|
||||
for (let release of data) {
|
||||
@@ -133,7 +135,9 @@
|
||||
let files = [];
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://api.github.com/repos/Laxilef/OTGateway/releases/${releaseId}/assets`);
|
||||
const response = await fetch(`https://api.github.com/repos/Laxilef/OTGateway/releases/${releaseId}/assets`, {
|
||||
cache: "no-cache"
|
||||
});
|
||||
const assets = await response.json();
|
||||
|
||||
for (const file of assets) {
|
||||
@@ -164,7 +168,9 @@
|
||||
fwBoard.remove(1);
|
||||
}
|
||||
|
||||
const response = await fetch(`https://corsproxy.io/?url=${configUrl}`);
|
||||
const response = await fetch(`https://corsproxy.io/?url=${configUrl}`, {
|
||||
cache: "no-cache"
|
||||
});
|
||||
const boards = await response.json();
|
||||
|
||||
for (let board of boards) {
|
||||
@@ -264,7 +270,9 @@
|
||||
statusContainer.textContent = "Downloading files...";
|
||||
|
||||
for (let file of files) {
|
||||
const response = await fetch(`https://corsproxy.io/?url=${file.url}`);
|
||||
const response = await fetch(`https://corsproxy.io/?url=${file.url}`, {
|
||||
cache: "no-cache"
|
||||
});
|
||||
const firmwareArrayBuffer = await response.arrayBuffer();
|
||||
const uint8Array = new Uint8Array(firmwareArrayBuffer);
|
||||
file.data = "";
|
||||
|
||||
Reference in New Issue
Block a user