WTVPNG supports webp and svg too!

This commit is contained in:
zefie
2026-04-26 02:52:04 -04:00
parent 115c66f0a9
commit 1923a8d9f0

View File

@@ -1341,7 +1341,9 @@ async function sendToClient(socket, headers_obj, data = null) {
if (minisrv_config.config.decode_png) { if (minisrv_config.config.decode_png) {
const contype_key = wtvshared.getCaseInsensitiveKey('content-type', headers_obj); const contype_key = wtvshared.getCaseInsensitiveKey('content-type', headers_obj);
if (contype_key) { if (contype_key) {
if (headers_obj[contype_key].toLowerCase() === "image/png") { if (headers_obj[contype_key].toLowerCase() === "image/png" ||
headers_obj[contype_key].toLowerCase() === "image/svg+xml" ||
headers_obj[contype_key].toLowerCase() === "image/webp") {
const convertOpts = { const convertOpts = {
jpegQuality: minisrv_config.config.decode_png_jpeg_quality, jpegQuality: minisrv_config.config.decode_png_jpeg_quality,
type: 'ALF' type: 'ALF'
@@ -2190,6 +2192,7 @@ function reloadConfig() {
// SERVER START // SERVER START
const git_commit = getGitRevision() const git_commit = getGitRevision()
const pkgjson = require('./package.json'); const pkgjson = require('./package.json');
const { head } = require('nntp-server-zefie/lib/commands/article');
let z_title = "zefie's wtv minisrv v" + pkgjson.version; let z_title = "zefie's wtv minisrv v" + pkgjson.version;
const z_cgiver = "minisrv/" + pkgjson.version; const z_cgiver = "minisrv/" + pkgjson.version;
if (git_commit) z_title += " (git " + git_commit + ")"; if (git_commit) z_title += " (git " + git_commit + ")";