Add secure and verify to landing

This commit is contained in:
Korbs 2024-04-30 23:04:20 -04:00
parent cdd0cbf72b
commit c488771d5d

View file

@ -117,12 +117,24 @@ module.exports = function (app, config, renderTemplate) {
const browser = req.useragent.browser; const browser = req.useragent.browser;
const isOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox"; const isOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
const secure = [
"poketube.fun",
"localhost" // Testing purposes
].includes(req.hostname);
const verify = [
"poketube.fun",
"poke.ashley0143.xyz",
"localhost"
].includes(req.hostname);
const rendermainpage = () => { const rendermainpage = () => {
if (req.useragent.isMobile) { if (req.useragent.isMobile) {
return res.redirect("/app"); return res.redirect("/app");
} }
return renderTemplate(res, req, "landing.ejs", { return renderTemplate(res, req, "landing.ejs", {
secure,
verify,
isOldWindows, isOldWindows,
random random
}); });