Fixed Proxy URL stripper bug and HTTP protocol bug

This commit is contained in:
venxm14
2026-06-21 21:13:45 +05:30
parent d03b047e89
commit 74bf677f83
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -11,6 +11,7 @@ const { resolveImdbId } = require('./utils/tmdb');
const { applyFilters } = require('./utils/streamFilters');
const app = express();
app.set('trust proxy', 1);
// Conditionally mount proxy routes early so downstream handlers can use them
if (config.enableProxy) {
+3 -1
View File
@@ -95,7 +95,9 @@ function extractOriginalUrl(proxyUrl) {
while (decoded.includes('%2F')) {
try { decoded = decodeURIComponent(decoded); } catch { break; }
}
return decoded;
if (decoded.startsWith('http://') || decoded.startsWith('https://')) return decoded;
// If it's just a path (like Vidlink /proxy/wiwii/...), keep the full original URL
return proxyUrl;
}
}
if (url.searchParams.has('url')) return decodeURIComponent(url.searchParams.get('url'));