mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-24 04:08:05 +01:00
Add secure and verify to landing
This commit is contained in:
parent
cdd0cbf72b
commit
c488771d5d
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue