mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
express-http-proxy: proxyReqPathResolver can also return Promise<string> (#43528)
* Add test, too * proxyReqPathResolver: can also return promise proxyReqPathResolver can also return a promise to a string * Update version number Update version number of express-http-proxy to 1.6
This commit is contained in:
@@ -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"
|
||||
});
|
||||
|
||||
Vendored
+2
-2
@@ -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 <https://github.com/ulrichb>
|
||||
// Daniel Schopf <https://github.com/Danscho>
|
||||
@@ -25,7 +25,7 @@ declare namespace proxy {
|
||||
res: Response,
|
||||
next: NextFunction
|
||||
) => any;
|
||||
proxyReqPathResolver?: (req: Request) => string;
|
||||
proxyReqPathResolver?: (req: Request) => string | Promise<string>;
|
||||
proxyReqOptDecorator?: (
|
||||
proxyReqOpts: RequestOptions,
|
||||
srcReq: Request
|
||||
|
||||
Reference in New Issue
Block a user