npm.io
2.0.3 • Published 2 years ago

@types/proxy-addr

Licence
MIT
Version
2.0.3
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/proxy-addr

Summary

This package contains type definitions for proxy-addr (https://github.com/jshttp/proxy-addr#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/proxy-addr.

index.d.ts

/// <reference types="node" />
import { IncomingMessage } from "http";

export = proxyAddr;

declare function proxyAddr(
    req: IncomingMessage,
    trust: proxyAddr.Address | proxyAddr.Address[] | ((addr: string, i: number) => boolean),
): string;

declare namespace proxyAddr {
    function all(req: IncomingMessage, trust?: Address | Address[] | ((addr: string, i: number) => boolean)): string[];
    function compile(val: Address | Address[]): (addr: string, i: number) => boolean;

    type Address = "loopback" | "linklocal" | "uniquelocal" | string;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: @types/node

Credits

These definitions were written by BendingBender.