From 4b416e2071dfe6cd3fad328859c11fc433d3cf3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Cirka?= Date: Fri, 10 Nov 2023 21:15:50 +0100 Subject: [PATCH] Enabled `.xslt`, `.xsd` and `.xls` extensions for handling static files. --- 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 84e84c1..21ec711 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,6 +14,7 @@ - updated Flow module - added support for `jsonschemas/*.txt` with inline implementation of the JSON schemas - added a `String.markdown(opt)` parser +- enabled `.xslt`, `.xsd` and `.xls` extensions for handling static files ======================== 0.0.91 diff --git a/index.js b/index.js index 42aa35b..0b02d0d 100755 --- a/index.js +++ b/index.js @@ -2284,7 +2284,7 @@ function Framework() { static_url_font: '/fonts/', static_url_download: '/download/', static_url_components: '/components.', - static_accepts: { 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 }, + static_accepts: { 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, xslt: true, xsd: true, xls: true }, // 'static-accepts-custom': [], default_crypto_iv: Buffer.from(self.syshash).slice(0, 16), diff --git a/utils.js b/utils.js index 530f7e9..f43417b 100755 --- a/utils.js +++ b/utils.js @@ -209,6 +209,7 @@ var CONTENTTYPES = { xml: 'application/xml', xpm: 'image/x-xpixmap', xsl: 'application/xml', + xsd: 'application/xml', xslt: 'application/xslt+xml', zip: 'application/zip', '7zip': 'application/x-7z-compressed'