From 54ab0bd859978af72302cda95920d4f5dc60f377 Mon Sep 17 00:00:00 2001 From: Fabio Fioramonti Date: Fri, 29 Mar 2024 12:03:22 +0100 Subject: [PATCH] fix: proxy function can accept a function as first parameter --- types.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.d.ts b/types.d.ts index 78cdd0d..afce45f 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1,7 +1,7 @@ import * as koa from 'koa'; import * as http from 'http'; -declare function koaHttpProxy(host: string, options: koaHttpProxy.IOptions): koa.Middleware; +declare function koaHttpProxy(host: string | ((ctx: koa.Context) => string), options: koaHttpProxy.IOptions): koa.Middleware; declare namespace koaHttpProxy { export interface IOptions {