diff --git a/src/server/Server.js b/src/server/Server.js index 69f3da7..ba6c4da 100644 --- a/src/server/Server.js +++ b/src/server/Server.js @@ -31,7 +31,7 @@ class Server extends EventEmitter { const { MARIA_HOST, MARIA_USER, MARIA_PORT, MARIA_PASS, MARIA_DB, MONGO_HOST, MONGO_USER, MONGO_PORT, MONGO_PASS, MONGO_DB, NODE_ENV, SECRET, DISCORD_SECRET, DISCORD_ID } = process.env; // Secret used for cookies, discord secret is for discord oauth - const { discord, http: httpOpts, databases } = options; + const { discord, http: httpOpts, databases, callbackURL } = options; this._options = options; this._shardId = parseInt(process.env.SHARD_ID); @@ -59,7 +59,7 @@ class Server extends EventEmitter { discordScope: discord.scope, discordSecret: DISCORD_SECRET, discordVersion: discord.version, - callbackURL: `${this.baseURL}${discord.callbackURL}`, + callbackURL: `${this.baseURL}${callbackURL}`, cookie: { secure: true }