mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 21:31:46 +00:00
feat: prioritize COOLIFY_URL over MCP_PUBLIC_URL for inspector auto-connect URL
Added fallback to `process.env.COOLIFY_URL` before `MCP_PUBLIC_URL` when constructing the public URL for the MCP inspector, ensuring the correct base URL is used in environments where COOLIFY_URL is set.
This commit is contained in:
@@ -284,7 +284,7 @@ export async function main() {
|
|||||||
|
|
||||||
// MCP Inspector at root path - auto-connects to /mcp
|
// MCP Inspector at root path - auto-connects to /mcp
|
||||||
// Mounted AFTER /mcp so specific routes take precedence
|
// Mounted AFTER /mcp so specific routes take precedence
|
||||||
const mcpPublicUrl = process.env.MCP_PUBLIC_URL || `http://localhost:${PORT}`;
|
const mcpPublicUrl = process.env.COOLIFY_URL || process.env.MCP_PUBLIC_URL || `http://localhost:${PORT}`;
|
||||||
mountInspector(app, {
|
mountInspector(app, {
|
||||||
autoConnectUrl: `${mcpPublicUrl}/mcp`,
|
autoConnectUrl: `${mcpPublicUrl}/mcp`,
|
||||||
devMode: process.env.NODE_ENV !== "production",
|
devMode: process.env.NODE_ENV !== "production",
|
||||||
|
|||||||
Reference in New Issue
Block a user