2.0.4 • Published 6 months ago
@types/host-validation v2.0.4
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
// Type definitions for host-validation 2.0
// Project: https://github.com/brannondorsey/host-validation
// Definitions by: Rich Liu <https://github.com/dintopple>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Request, Response, NextFunction } 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: Thu, 08 Jul 2021 14:22:53 GMT
- Dependencies: @types/express
- Global values: none
Credits
These definitions were written by Rich Liu.