- update: config.json: add DoNotEncrypt flags to http and https
- update: app.js: add ability to override service flags when using getServiceString
- update: app.js: add ability to disable 'wtv-star' while keeping 'wtv-*'
- update: app.js: add internal header 'minisrv-use-carriage-return', set to 'false' to disable `\r` in headers
- implement bf0app flashrom functionality
This commit is contained in:
zefie
2021-08-01 19:43:50 -04:00
parent 228ba3ebdb
commit 6e9e84abf0
14 changed files with 360 additions and 58 deletions

View File

@@ -1,9 +1,10 @@
if (request_headers.query.path) {
var url = "wtv-flashrom:/get-lc2-page?path=" + request_headers.query.path;
var romtype = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
if (romtype == "bf0app") {
url = "client:updateflash?ipaddr="+minisrv_config.services[service_name].host+"&port="+minisrv_config.services[service_name].port+"&path=" + request_headers.query.path;
}
if (romtype == "bf0app") {
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + escape(url.replace("get-lc2-page", "get-by-path"));
if (request_headers.query.numparts) url += escape("&numparts=" + request_headers.query.numparts);
}
headers = "300 OK\n";
headers += "wtv-visit: " + url + "\n";
headers += "Location: " + url + "\n";