From 303037907234c1507baa30ad51a1f49d70e61cb7 Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Tue, 9 Dec 2025 02:07:04 +0000 Subject: [PATCH] Update base URL to use custom domain for the bot Change the base URL in webServer.js from the Replit deployment URL to use the configured `BASE_URL` environment variable, defaulting to `https://bot.aethex.dev`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: d7464c02-f803-4f2c-b6ad-c5f0ef687903 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/h41eDR1 Replit-Helium-Checkpoint-Created: true --- .replit | 2 +- aethex-bot/server/webServer.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.replit b/.replit index 428d7ec..951aaa3 100644 --- a/.replit +++ b/.replit @@ -60,6 +60,6 @@ CORP_GUILD_ID = "373713073594302464" FOUNDATION_GUILD_ID = "1338564560277344287" WHITELISTED_USERS = "113472107526033408" ALERT_CHANNEL_ID = "1435905356932055233" +BASE_URL = "https://bot.aethex.dev" [userenv.production] -BASE_URL = "https://aethex-bot-master.replit.app" diff --git a/aethex-bot/server/webServer.js b/aethex-bot/server/webServer.js index d6c5852..64d78e7 100644 --- a/aethex-bot/server/webServer.js +++ b/aethex-bot/server/webServer.js @@ -11,8 +11,8 @@ function createWebServer(discordClient, supabase, options = {}) { const DISCORD_CLIENT_ID = process.env.DISCORD_CLIENT_ID; const DISCORD_CLIENT_SECRET = process.env.DISCORD_CLIENT_SECRET; const SESSION_SECRET = process.env.SESSION_SECRET || crypto.randomBytes(32).toString('hex'); - // Always use production URL for OAuth to avoid multiple redirect URIs - const BASE_URL = 'https://aethex-bot-master.replit.app'; + // Production URL for OAuth + const BASE_URL = process.env.BASE_URL || 'https://bot.aethex.dev'; app.use(cors({ origin: true,