diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsx index 987a517ef5..ad528e9fb9 100644 --- a/web/app/components/tools/mcp/modal.tsx +++ b/web/app/components/tools/mcp/modal.tsx @@ -141,8 +141,8 @@ const MCPModal = ({ const isValidUrl = (string: string) => { try { - const urlPattern = /^(https?:\/\/)((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3})|localhost)(:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?/i - return urlPattern.test(string) + const url = new URL(string) + return url.protocol === 'http:' || url.protocol === 'https:' } catch { return false diff --git a/web/i18n/sl-SI/tools.ts b/web/i18n/sl-SI/tools.ts index dccf8b9178..cae126d99d 100644 --- a/web/i18n/sl-SI/tools.ts +++ b/web/i18n/sl-SI/tools.ts @@ -205,10 +205,10 @@ const translation = { maskedHeadersTip: 'Vrednosti glave so zakrite zaradi varnosti. Spremembe bodo posodobile dejanske vrednosti.', authentication: 'Avtentikacija', configurations: 'Konfiguracije', - clientSecret: 'Skrivnost stranke', + clientSecret: 'Skrivnost odjemalca', useDynamicClientRegistration: 'Uporabi dinamično registracijo odjemalca', - clientID: 'ID stranke', - clientSecretPlaceholder: 'Skrivnost stranke', + clientID: 'ID odjemalca', + clientSecretPlaceholder: 'Skrivnost odjemalca', }, delete: 'Odstrani strežnik MCP', deleteConfirmTitle: 'Odstraniti {mcp}?',