From f0d7e9d3c7e7c8a7cda00449f528ab75c8ada1b5 Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 30 Dec 2022 19:49:13 +0000 Subject: [PATCH] so basically in germany you can eat food --- src/libpoketube/init/pages-video.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/libpoketube/init/pages-video.js b/src/libpoketube/init/pages-video.js index 3f936c56..6047abd1 100644 --- a/src/libpoketube/init/pages-video.js +++ b/src/libpoketube/init/pages-video.js @@ -108,7 +108,6 @@ function IsInArray(array, id) { return false; } - module.exports = function (app, config, renderTemplate) { app.get("/encryption", async function (req, res) { var v = req.query.v; @@ -174,13 +173,19 @@ module.exports = function (app, config, renderTemplate) { const ip = JSON.parse(jj); const isvld = await core.isvalidvideo(v); - + if (!v) res.redirect("/"); var secure; - - if(req.hostname == "poketube.fun" || req.hostname == "poketube.site" || req.hostname == "poketube.online" || req.hostname == "poketube.xyz" || req.hostname == "watch.poketalebot.com") { - secure = true + + if ( + req.hostname == "poketube.fun" || + req.hostname == "poketube.site" || + req.hostname == "poketube.online" || + req.hostname == "poketube.xyz" || + req.hostname == "watch.poketalebot.com" + ) { + secure = true; } else { - secure = false + secure = false; } if (isvld) {