@nanggo/social-preview
Version:
Generate beautiful social media preview images from any URL
21 lines (20 loc) • 699 B
TypeScript
/**
* Secure HTTP/HTTPS Agent implementation
* Prevents DNS rebinding and SSRF attacks by validating IP addresses at connection time
*/
import http from 'http';
import https from 'https';
/**
* Create secure HTTP agent with private IP blocking
*/
export declare function createSecureHttpAgent(): http.Agent;
/**
* Create secure HTTPS agent with private IP blocking
*/
export declare function createSecureHttpsAgent(): https.Agent;
export declare function getSecureHttpAgent(): http.Agent;
export declare function getSecureHttpsAgent(): https.Agent;
/**
* Get appropriate secure agent based on protocol
*/
export declare function getSecureAgentForUrl(url: string): http.Agent | https.Agent;