From 51435b93076237c968fe3bb5210296c7f58cb187 Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 17 Sep 2026 08:37:47 +0000 Subject: [PATCH] Make live update badge injection robust --- wrapper.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wrapper.js b/wrapper.js index ba91bd1..929ef00 100644 --- a/wrapper.js +++ b/wrapper.js @@ -3,8 +3,7 @@ import http from 'node:http'; const originalEnd = http.ServerResponse.prototype.end; http.ServerResponse.prototype.end = function (chunk, encoding, callback) { - const type = String(this.getHeader('content-type') || ''); - if (typeof chunk === 'string' && type.startsWith('text/html') && chunk.includes('')) { + if (typeof chunk === 'string' && chunk.includes('')) { const badge = '
v2 ยท live update
'; chunk = chunk.replace('', `${badge}`); }