update cSetup

This commit is contained in:
zefie
2025-07-07 08:45:38 -04:00
parent 1faffc8d5a
commit 7e7c5b142e
8 changed files with 54 additions and 36 deletions

View File

@@ -1176,7 +1176,7 @@ function handleProxy(socket, request_type, request_headers, res, data) {
headers["wtv-http-proxy"] = true;
headers["wtv-trusted"] = false;
if (res.headers['Content-Type'].substr(0, 4) == "text") {
if (typeof res.headers['Content-Type'] === 'string' && res.headers['Content-Type'].startsWith("text")) {
if (request_type != "http" && request_type != "https") {
// replace http and https links on non http/https protocol (for proto:// for example)
var data_t = data.toString().replaceAll("http://", request_type + "://").replaceAll("https://", request_type + "://");