diff --git a/types/express-http-proxy/express-http-proxy-tests.ts b/types/express-http-proxy/express-http-proxy-tests.ts index 61eb11a056..0f2f69d025 100644 --- a/types/express-http-proxy/express-http-proxy-tests.ts +++ b/types/express-http-proxy/express-http-proxy-tests.ts @@ -11,6 +11,10 @@ proxy("www.google.com", { proxyReqPathResolver: req => req.url }); +proxy("www.google.com", { + proxyReqPathResolver: async req => req.url +}); + proxy("www.google.com", { limit: "10mb" }); diff --git a/types/express-http-proxy/index.d.ts b/types/express-http-proxy/index.d.ts index 651619197b..201f1334dd 100644 --- a/types/express-http-proxy/index.d.ts +++ b/types/express-http-proxy/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for express-http-proxy 1.5 +// Type definitions for express-http-proxy 1.6 // Project: https://github.com/villadora/express-http-proxy#readme // Definitions by: ulrichb // Daniel Schopf @@ -25,7 +25,7 @@ declare namespace proxy { res: Response, next: NextFunction ) => any; - proxyReqPathResolver?: (req: Request) => string; + proxyReqPathResolver?: (req: Request) => string | Promise; proxyReqOptDecorator?: ( proxyReqOpts: RequestOptions, srcReq: Request