Skip to content

Commit

Permalink
Fix openepaperlink.eu proxy on https proxies (OpenEPaperLink#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbruhn authored Mar 4, 2024
1 parent ba82ab8 commit b527d3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ESP32_AP-Flasher/wwwroot/ota.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export async function updateWebpage(fileUrl, tagname, showReload) {

print("Updating littleFS partition...");

fetch("http://openepaperlink.eu/getupdate/?url=" + fileUrl)
fetch("//openepaperlink.eu/getupdate/?url=" + fileUrl)
.then(response => response.json())
.then(data => {
checkfiles(data);
Expand Down Expand Up @@ -271,7 +271,7 @@ export async function updateESP(fileUrl, showConfirm) {

while (retryCount < maxRetries) {
try {
const response = await fetch("http://openepaperlink.eu/getupdate/?url=" + fileUrl + "&env=" + env);
const response = await fetch("//openepaperlink.eu/getupdate/?url=" + fileUrl + "&env=" + env);
const responseBody = await response.text();
if (!response.ok) {
throw new Error("Network response was not OK: " + responseBody);
Expand Down Expand Up @@ -389,7 +389,7 @@ $('#selectRepo').onclick = function (event) {
const filesJsonAsset = assets.find(asset => asset.name === 'filesystem.json');
const binariesJsonAsset = assets.find(asset => asset.name === 'binaries.json');
if (filesJsonAsset && binariesJsonAsset) {
const updateUrl = "http://openepaperlink.eu/getupdate/?url=" + binariesJsonAsset.browser_download_url + "&env=" + $('#repo').value;
const updateUrl = "//openepaperlink.eu/getupdate/?url=" + binariesJsonAsset.browser_download_url + "&env=" + $('#repo').value;
return fetch(updateUrl);
} else {
throw new Error("Json file binaries.json and/or filesystem.json not found in the release assets");
Expand Down

0 comments on commit b527d3e

Please sign in to comment.