UNPKG

561 BTypeScriptView Raw
1/// <reference types="node" />
2import { IncomingMessage } from "http";
3
4export = proxyAddr;
5
6declare function proxyAddr(
7 req: IncomingMessage,
8 trust: proxyAddr.Address | proxyAddr.Address[] | ((addr: string, i: number) => boolean),
9): string;
10
11declare namespace proxyAddr {
12 function all(req: IncomingMessage, trust?: Address | Address[] | ((addr: string, i: number) => boolean)): string[];
13 function compile(val: Address | Address[]): (addr: string, i: number) => boolean;
14
15 type Address = "loopback" | "linklocal" | "uniquelocal" | string;
16}