UNPKG

express-force-https-schema

Version:

configurable express middleware that forces https schema based on x-forwarded-proto header

24 lines (20 loc) 503 B
declare module "express-force-https-schema" { export type EnabledFunction = ( req: Express.Request, res: Express.Response, options: IOptions ) => boolean; export interface IOptions { enabled?: EnabledFunction | boolean; userAgentHeader?: string; schemaHeader?: string; skipUserAgents?: RegExp; } export function forceHttpsSchema( options?: IOptions ): ( req: Express.Request, res: Express.Response ) => void; export default forceHttpsSchema; }