mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
17 lines • 551 B
TypeScript
/**
* URL sanitization utility
*
* Sanitizes URLs to prevent security issues by:
* - Restricting to http/https protocols only
* - Encoding URL components properly
* - Validating hostnames
*/
/**
* Sanitizes a URL string by encoding all components and validating the protocol.
*
* @param raw - The raw URL string to sanitize
* @returns The sanitized URL as a string
* @throws Error if the URL is invalid or uses an unsupported protocol
*/
export declare function sanitizeUrl(raw: string): string;
//# sourceMappingURL=url-sanitize.d.ts.map