Better host input

This commit is contained in:
Akif9748 2022-09-17 19:53:00 +03:00
parent b048d6a685
commit a1af3f2d4e
2 changed files with 2 additions and 2 deletions

View file

@ -14,5 +14,5 @@
"windowMs": 60000 "windowMs": 60000
}, },
"discord_auth": false, "discord_auth": false,
"host": "akf-forum.glitch.me" "host": "https://akf-forum.glitch.me"
} }

View file

@ -54,5 +54,5 @@ const server = app.listen(port, () => console.log(`${forum_name}-forum on port:`
if (discord_auth) { if (discord_auth) {
const { address } = server.address(); const { address } = server.address();
app.set("discord_auth", `https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT}&redirect_uri=http%3A%2F%2F${host}%2Fdiscord_auth%2Fhash&response_type=token&scope=identify`); app.set("discord_auth", `https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT}&redirect_uri=${host}%2Fdiscord_auth%2Fhash&response_type=token&scope=identify`);
} }