UNPKG

@metis-w/api-client

Version:

Modern TypeScript HTTP API client with dynamic routes, parameterized endpoints, interceptors, and advanced features

19 lines 729 B
export declare class Sanitizer { /** * Sanitizes request headers to prevent header injection attacks * by filtering out potentially dangerous header keys and values. * * @param headers - The headers object to sanitize * @returns A new object with sanitized headers */ static sanitizeHeaders(headers: Record<string, string>): Record<string, string>; /** * Sanitizes a path to prevent directory traversal and script injection attacks. * It removes dangerous characters and normalizes the path. * * @param path - The path to sanitize * @returns A sanitized path string */ static sanitizePath(path: string): string; } //# sourceMappingURL=sanitizer.d.ts.map