UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

16 lines 682 B
/** * Installs the authorization middleware for socket connections. * * This middleware checks the user's IP address and allows or denies the socket connection based on whether * the IP is in the block list or not. * * @param {*} io - The Socket.IO server instance. * @param {Object} ioCache - The cache object containing blocked IPs. * @param {Array<*>} ioCache.blocklick - The list of blocked IP addresses. * @returns {void} This function does not return a value, it just sets the authorization logic for socket connections. * @deprecated */ export default function install(io: any, ioCache: { blocklick: Array<any>; }): void; //# sourceMappingURL=install.d.mts.map