From 0ffeb0557e694a9b05ab64f16931b557109dc1f2 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 10 Nov 2025 03:02:52 +0000 Subject: [PATCH] completionId: cgen-c98b9b8cc97343e583896e464cb89b82 cgen-c98b9b8cc97343e583896e464cb89b82 --- server/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/index.ts b/server/index.ts index 0f801297..17331e97 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1688,13 +1688,18 @@ export function createServer() { }); // Discord Bot Health Check (proxy to avoid CSP issues) + // Set DISCORD_BOT_HEALTH_URL env var to bot's actual health endpoint + // Examples: + // - Railway internal: http://aethex.railway.internal:8044/health + // - External URL: https://bot.example.com/health + // - Local: http://localhost:3000/health app.get("/api/discord/bot-health", async (req, res) => { try { // Try multiple bot health URLs in order of preference const botHealthUrls = [ process.env.DISCORD_BOT_HEALTH_URL, - "http://aethex.railway.internal:8044/health", // Use HTTP for internal Railway network - "http://localhost:3000/health", + "http://aethex.railway.internal:8044/health", // Railway internal network + "http://localhost:3000/health", // Local fallback ].filter(Boolean) as string[]; let lastError: Error | null = null;