mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Improve Proxy Command Typings
This commit is contained in:
parent
d430889d20
commit
cb52fa93b0
@ -26,3 +26,5 @@ proxy('www.google.com', {
|
||||
return headers;
|
||||
}
|
||||
});
|
||||
|
||||
proxy((req) => 'com.google.www'.split('.').reverse().join('.'));
|
||||
|
||||
3
types/express-http-proxy/index.d.ts
vendored
3
types/express-http-proxy/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/villadora/express-http-proxy#readme
|
||||
// Definitions by: ulrichb <https://github.com/ulrichb>
|
||||
// Daniel Schopf <https://github.com/Danscho>
|
||||
// Gabriel Fournier <https://github.com/carboneater>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@ -15,6 +16,6 @@ interface ProxyOptions {
|
||||
userResHeaderDecorator?: (headers: IncomingHttpHeaders, userReq: Request, userRes: Response, proxyReq: Request, proxyRes: Response) => OutgoingHttpHeaders;
|
||||
}
|
||||
|
||||
declare function proxy(host: string, options?: ProxyOptions): RequestHandler;
|
||||
declare function proxy(host: string|((req: Request) => string), options?: ProxyOptions): RequestHandler;
|
||||
|
||||
export = proxy;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user