@types/proxy-addr
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

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 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/proxy-addr

Weekly Downloads

68,768

Version

2.0.3

License

MIT

Unpacked Size

3.77 kB

Total Files

5

Last publish

Collaborators

  • types