MCPcopy Create free account
hub / github.com/chimurai/http-proxy-middleware / createProxyMiddleware

Function createProxyMiddleware

src/factory.ts:82–89  ·  view source on GitHub ↗
(options: Options<TReq, TRes>)

Source from the content-addressed store, hash-verified

80 * @see https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md
81 */
82export function createProxyMiddleware<
83 TReq extends http.IncomingMessage = http.IncomingMessage,
84 TRes extends http.ServerResponse = http.ServerResponse,
85 TNext extends (err?: unknown) => void = NextFunction,
86>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext> {
87 const { middleware } = new HttpProxyMiddleware<TReq, TRes, TNext>(options);
88 return middleware;
89}

Callers 15

ipv6.spec.tsFile · 0.85
http-query.spec.tsFile · 0.85
startProxyServerFunction · 0.85
websocket.spec.tsFile · 0.85
router.spec.tsFile · 0.85
nock.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by 1

startProxyServerFunction · 0.68