- fix: wtv-home:/home: remove `nostatus` to enable loading progress bar for outgoing links
 - fix: wtv-1800:/finish-prereg: swap error message location for better debugging
 - fix: app.js: Properly clean up old sockets
 - fix: wtv-flashrom: fix search for local flashrom files
 - update: wtv-home:/home: add link to access downloaded DealerDemo
This commit is contained in:
zefie
2021-07-21 15:54:02 -04:00
parent e18be0d9d7
commit 344058828e
6 changed files with 40 additions and 23 deletions

View File

@@ -26,8 +26,13 @@ function doLocalFlashROM(flashrom_file_path) {
if (request_headers.query.raw) {
if ((/\.brom$/).test(request_path)) headers += "Content-Type: binary/x-wtv-bootrom"; // maybe?
else headers += "Content-Type: binary/x-wtv-flashblock";
var flashrom_file_path = service_dir + '/' + request_path;
if (minisrv_config.services[service_name].use_zefie_server && !fs.existsSync(flashrom_file_path)) {
var flashrom_file_path = null;
Object.keys(service_vaults).forEach(function (g) {
if (flashrom_file_path != null) return;
flashrom_file_path = service_vaults[g].path + "/" + service_name + "/" + request_path;
if (!fs.existsSync(flashrom_file_path)) flashrom_file_path = null;
});
if (minisrv_config.services[service_name].use_zefie_server && !flashrom_file_path) {
// get flashrom files from archive.midnightchannel.net
var options = {
host: "archive.midnightchannel.net",

View File

@@ -26,8 +26,14 @@ if (!request_headers.query.path) {
data = errpage[1];
} else {
var request_path = unescape(request_headers.query.path);
var flashrom_file_path = service_dir + '/' + request_path;
if (minisrv_config.services[service_name].use_zefie_server && !fs.existsSync(flashrom_file_path)) {
var flashrom_file_path = null;
Object.keys(service_vaults).forEach(function (g) {
if (flashrom_file_path != null) return;
flashrom_file_path = service_vaults[g].path + "/" + service_name + "/" + request_path;
if (!fs.existsSync(flashrom_file_path)) flashrom_file_path = null;
});
if (minisrv_config.services[service_name].use_zefie_server && !flashrom_file_path) {
// read first 256 bytes of flashrom file from archive.midnightchannel.net
// to get `flashrom_message` and `numparts` if missing
var options = {