From 0c6bf72f81e2986efa30531d9c6f43578a629373 Mon Sep 17 00:00:00 2001 From: petersirka Date: Tue, 10 Dec 2024 11:52:22 +0100 Subject: [PATCH] Added support for `log` extension in static file processing. --- changelog.txt | 1 + index.js | 2 +- utils.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 2b87eca..98374fb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -11,6 +11,7 @@ - fixed context in the components - fixed URL downloading templates in `TEMPLATE()` method - fixed parsing of unpaired elements in HTMLParser +- added support for `log` extension in static file processing ======================== 0.0.7 diff --git a/index.js b/index.js index aaea21d..91c0c78 100644 --- a/index.js +++ b/index.js @@ -354,7 +354,7 @@ function unlink(arr, callback) { CONF.$httpmaxsize = 256; // kB CONF.$httprangebuffer = 5120; // 5 MB CONF.$httptimeout = 5; // 5 seconds - CONF.$httpfiles = { flac: true, jpg: true, jpeg: true, png: true, gif: true, ico: true, wasm: true, js: true, mjs: true, css: true, txt: true, xml: true, woff: true, woff2: true, otf: true, ttf: true, eot: true, svg: true, zip: true, rar: true, pdf: true, docx: true, xlsx: true, doc: true, xls: true, html: true, htm: true, appcache: true, manifest: true, map: true, ogv: true, ogg: true, mp4: true, mp3: true, webp: true, webm: true, swf: true, package: true, json: true, ui: true, md: true, m4v: true, jsx: true, heif: true, heic: true, ics: true, ts: true, m3u8: true, wav: true, xsd: true, xsl: true, xslt: true, ipynb: true, ijsnb: true }; + CONF.$httpfiles = { flac: true, jpg: true, jpeg: true, png: true, gif: true, ico: true, wasm: true, js: true, mjs: true, css: true, txt: true, xml: true, woff: true, woff2: true, otf: true, ttf: true, eot: true, svg: true, zip: true, rar: true, pdf: true, docx: true, xlsx: true, doc: true, xls: true, html: true, htm: true, appcache: true, manifest: true, map: true, ogv: true, ogg: true, mp4: true, mp3: true, webp: true, webm: true, swf: true, package: true, json: true, ui: true, md: true, m4v: true, jsx: true, heif: true, heic: true, ics: true, ts: true, m3u8: true, wav: true, xsd: true, xsl: true, xslt: true, ipynb: true, ijsnb: true, log: true }; CONF.$httpchecktypes = true; // for multipart data only CONF.$httpmaxage = 60; // in seconds CONF.$httpmaxkeys = 33; diff --git a/utils.js b/utils.js index 42acbd1..4568aec 100755 --- a/utils.js +++ b/utils.js @@ -325,6 +325,7 @@ var CONTENTTYPES = { ui: 'application/json', // UI builder jsx: 'text/jsx', less: 'text/css', + log: 'text/plain', m3u8: 'application/x-mpegURL', m4a: 'audio/mp4a-latm', m4v: 'video/x-m4v',