Installation
npm install --save @types/host-validation
Summary
This package contains type definitions for host-validation (https://github.com/brannondorsey/host-validation).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/host-validation.
index.d.ts
import { NextFunction, Request, Response } from "express";
declare namespace hostValidation {
interface config {
hosts?: Array<string | RegExp> | undefined;
referers?: Array<string | RegExp> | undefined;
mode?: "both" | "either" | undefined;
fail?(req: Request, res: Response, next: NextFunction): void;
}
}
declare function hostValidation(opts: hostValidation.config): (req: Request, res: Response, next: NextFunction) => void;
export = hostValidation;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: @types/express
Credits
These definitions were written by Rich Liu.