fix: get backend url dynamically for mcp (#7878)
added check to use backend URL if baseURL is set (desktop)
This commit is contained in:
parent
1ebf1598c8
commit
940b1100ca
1 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import ShadTooltip from "@/components/common/shadTooltipComponent";
|
||||||
import ToolsComponent from "@/components/core/parameterRenderComponent/components/ToolsComponent";
|
import ToolsComponent from "@/components/core/parameterRenderComponent/components/ToolsComponent";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { createApiKey } from "@/controllers/API";
|
import { createApiKey } from "@/controllers/API";
|
||||||
|
import { api } from "@/controllers/API/api";
|
||||||
import {
|
import {
|
||||||
useGetFlowsMCP,
|
useGetFlowsMCP,
|
||||||
usePatchFlowsMCP,
|
usePatchFlowsMCP,
|
||||||
|
|
@ -61,7 +62,9 @@ const McpServerTab = ({ folderName }: { folderName: string }) => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const apiUrl = `${PROXY_TARGET}/api/v1/mcp/project/${projectId}/sse`;
|
const apiHost = api.defaults.baseURL || window.location.origin;
|
||||||
|
|
||||||
|
const apiUrl = `${apiHost}/api/v1/mcp/project/${projectId}/sse`;
|
||||||
|
|
||||||
const MCP_SERVER_JSON = `{
|
const MCP_SERVER_JSON = `{
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue