nestjs-cluster-throttle
Version:
Enterprise-grade rate limiting module for NestJS with Redis support, multiple strategies, and cluster mode
17 lines • 812 B
TypeScript
import { GeoLocationProvider, GeoLocationResult } from '../interfaces/geo-location.interface';
import { InternalGeoProvider } from '../providers/internal-geo.provider';
import { IpApiGeoProvider } from '../providers/ip-api-geo.provider';
export declare class GeoService {
private internalProvider;
private ipApiProvider;
private provider;
constructor(internalProvider: InternalGeoProvider, ipApiProvider: IpApiGeoProvider);
setProvider(provider: 'internal' | 'ip-api' | GeoLocationProvider): void;
lookup(ip: string): Promise<GeoLocationResult | null>;
isCountryAllowed(ip: string, allowedCountries?: string[], blockedCountries?: string[]): Promise<{
allowed: boolean;
country?: string;
countryCode?: string;
}>;
}
//# sourceMappingURL=geo.service.d.ts.map