From a1af3f2d4e30824cb5d72a474615bc1270d7607e Mon Sep 17 00:00:00 2001 From: Akif9748 Date: Sat, 17 Sep 2022 19:53:00 +0300 Subject: [PATCH] Better host input --- config.json.example | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.json.example b/config.json.example index c652123..1859127 100644 --- a/config.json.example +++ b/config.json.example @@ -14,5 +14,5 @@ "windowMs": 60000 }, "discord_auth": false, - "host": "akf-forum.glitch.me" + "host": "https://akf-forum.glitch.me" } \ No newline at end of file diff --git a/index.js b/index.js index 3d583c9..e9237e8 100644 --- a/index.js +++ b/index.js @@ -54,5 +54,5 @@ const server = app.listen(port, () => console.log(`${forum_name}-forum on port:` if (discord_auth) { 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`); } \ No newline at end of file