fix: inconsistent config key for zip

Massimo Melina committed Jan 26, 2022 at 11:15 UTC 0133b692a42044444a22dc0d24294fc69fd89905
2 files changed +2 -2
config.yaml
+1 -1
@@ -4,7 +4,7 @@ port: 80 # 0 is a special value that will let the system pick a random availa
4 #max_kbps_per_ip: 500
5 #log:
6 #error_log:
7 -#zip-calculate-size-for-seconds: 1
7 +#zip_calculate_size_for_seconds: 1
8 #open_browser_at_start: false
9 #https_port: 443 # https will work only if you give a valid certificate and private key
10 #cert: filepath
src/zip.ts
+1 -1
@@ -44,7 +44,7 @@ export async function zipStreamFromFolder(node: VfsNode, ctx: Koa.Context) {
44 catch {}
45 })
46 const zip = new QuickZipStream(mappedWalker)
47 - const time = 1000 * (getConfig('zip-calculate-size-for-seconds') ?? 1)
47 + const time = 1000 * (getConfig('zip_calculate_size_for_seconds') ?? 1)
48 ctx.response.length = await zip.calculateSize(time)
49 ctx.body = zip
50 ctx.req.on('close', ()=> zip.destroy())