UNPKG

five-server

Version:

Development Server with Live Reload Capability. (Maintained Fork of Live Server)

28 lines 1.16 kB
/** * @copyright * Copyright (c) 2014 Andrew Kelley * Copyright (c) 2021 Yannick Deubel (https://github.com/yandeu) * * @license {@link https://github.com/yandeu/five-server/blob/main/LICENSE LICENSE} * * @description * copied and modified from proxy-middleware@0.15.0 (https://github.com/gonzalocasas/node-proxy-middleware/blob/master/index.js) * previously licensed under MIT (https://github.com/gonzalocasas/node-proxy-middleware/blob/master/LICENSE) */ import type { NextFunction, Request, Response } from 'express'; export interface ProxyMiddlewareOptions extends Omit<URL, 'toJSON'> { cookieRewrite?: boolean; headers?: any; method?: any; preserveHost: boolean; route?: string; via: boolean; /** @deprecated The path property is a concatenation of the pathname and search components. */ path: string; } interface RequestWithRetry extends Request { retries: number; } export declare const proxyMiddleware: (options: ProxyMiddlewareOptions, baseURL: string, injectBody: boolean) => (req: RequestWithRetry, res: Response, next: NextFunction) => Promise<void>; export {}; //# sourceMappingURL=proxy.d.ts.map