fix: Electron HTTP fix + stripped background fix

This commit is contained in:
LukeGus
2025-11-01 21:59:49 -05:00
parent 994d00e91f
commit a52a5217bf
11 changed files with 128 additions and 26 deletions

View File

@@ -65,7 +65,11 @@ app.use(
return callback(null, true);
}
callback(null, true);
if (origin.startsWith("http://")) {
return callback(null, true);
}
callback(new Error("Not allowed by CORS"));
},
credentials: true,
methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],

View File

@@ -603,7 +603,11 @@ app.use(
return callback(null, true);
}
callback(null, true);
if (origin.startsWith("http://")) {
return callback(null, true);
}
callback(new Error("Not allowed by CORS"));
},
credentials: true,
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],

View File

@@ -41,7 +41,11 @@ app.use(
return callback(null, true);
}
callback(null, true);
if (origin.startsWith("http://")) {
return callback(null, true);
}
callback(new Error("Not allowed by CORS"));
},
credentials: true,
methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],