1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 00:34:41 -05:00

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 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 = () => {
if (req.useragent.isMobile) {
return res.redirect("/app");
}
return renderTemplate(res, req, "landing.ejs", {
secure,
verify,
isOldWindows,
random
});