flashrom system updates

- fix bugs
- more WNI-like flow path
- make scripts use `service_name` variable so that they should work in a renamed service (eg not wtv-flashrom, untested)
This commit is contained in:
zefie
2021-08-09 18:16:54 -04:00
parent 7ae8fdc816
commit a078e58ce0
6 changed files with 26 additions and 27 deletions

View File

@@ -18,7 +18,7 @@ if (!minisrv_config.services[service_name].use_zefie_server) {
var options = {
host: "wtv.zefie.com",
path: "/willie.php?minisrv=true&pflash=" + ssid_sessions[socket.ssid].get("wtv-client-rom-type") + proxy_query,
path: "/willie.php?minisrv=true&service_name="+escape(service_name)+"&pflash=" + ssid_sessions[socket.ssid].get("wtv-client-rom-type") + proxy_query,
timeout: 5000,
method: 'GET'
}
@@ -42,7 +42,7 @@ const req = https.request(options, function (res) {
res.on('end', function () {
if (!zquiet) console.log(" * Upstream Ultra Willies HTTP Response:", res.statusCode, res.statusMessage);
if (request_headers.query.clear_cache) {
headers += "\nwtv-expire-all: wtv-flashrom";
headers += "\nwtv-expire-all: "+service_name;
}
sendToClient(socket, headers, data);
});