Files
minisrv/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/initiate-lc2-download.js
zefie 2a4997e846 v0.9.8
- fix: app.js: Use \r\n, fix connections= service setting
 - update: config.json: fix some service flags that were misset
 - Add ServiceFlags.txt: brief description of wtv-service flags
 - update: Moved tellyscripts to wtv-1800:/preregister
 - update: fixed bug where "send_tellyscript was undefined"
 - update: initial work on bf0app flashrom support (incomplete)
 - add wtv-1800:/offer-open-isp-suggest for dreamcast clients
 - fix: wtv-tricks:/info was not updated to use new ClientSessionData structure
 - update: app.js: add special filtering for Dreamcast clients
 - update: change default service logos
2022-11-29 07:43:53 -05:00

16 lines
615 B
JavaScript

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;
}
headers = "300 OK\n";
headers += "wtv-visit: " + url + "\n";
headers += "Location: " + url + "\n";
headers += "Content-type: text/html";
data = '';
} else {
var errpage = doErrorPage(400)
headers = errpage[0];
data = errpage[1];
}