Move remove slashes logic to getMCPProxyAddress
This commit is contained in:
parent
6c7c417645
commit
03e21bd3e4
1 changed files with 2 additions and 1 deletions
|
|
@ -5,8 +5,9 @@ import {
|
|||
} from "@/lib/constants";
|
||||
|
||||
export const getMCPProxyAddress = (config: InspectorConfig): string => {
|
||||
const proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value as string;
|
||||
var proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value as string;
|
||||
if (proxyFullAddress) {
|
||||
proxyFullAddress = proxyFullAddress.replace(/\/+$/, "");
|
||||
return proxyFullAddress;
|
||||
}
|
||||
return `${window.location.protocol}//${window.location.hostname}:${DEFAULT_MCP_PROXY_LISTEN_PORT}`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue