forked from xiamx/ssr-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp-proxy.d.ts
More file actions
30 lines (28 loc) · 926 Bytes
/
http-proxy.d.ts
File metadata and controls
30 lines (28 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Ambient declaration for http-proxy, created here for convenience
// should submit PR to DefinitelyTyped at somepoint to get into @types
declare module "http-proxy" {
interface ProxyServerOptions {
target?: string;
forward?: string;
agenet?: Object;
ssl?: Object;
ws?: boolean;
xfwd?: boolean;
secure?: boolean;
toProxy?: boolean;
prependPath?: boolean;
ignorePath?: boolean;
localAddress?: string;
changeOrigin?: boolean;
auth?: string;
autoRewrite?: boolean;
headers?: Object;
proxyTimeout?: number;
}
interface Proxy {
web: (req: any, res: any, options?: ProxyServerOptions) => void
ws: (req: any, socket, head, options?: ProxyServerOptions) => void
listen: (port: number) => void
}
function createProxyServer(options: ProxyServerOptions): Proxy
}