http-proxy-middleware 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/handlers/fix-request-body.d.ts +2 -3
- package/dist/handlers/fix-request-body.js +4 -3
- package/dist/types.d.ts +27 -11
- package/dist/types.js +4 -1
- package/package.json +23 -28
- package/CHANGELOG.md +0 -222
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
3
|
-
import type { Request } from '../types';
|
|
2
|
+
import type * as http from 'http';
|
|
4
3
|
/**
|
|
5
4
|
* Fix proxied body if bodyParser is involved.
|
|
6
5
|
*/
|
|
7
|
-
export declare function fixRequestBody(proxyReq: ClientRequest, req:
|
|
6
|
+
export declare function fixRequestBody(proxyReq: http.ClientRequest, req: http.IncomingMessage): void;
|
|
@@ -6,7 +6,8 @@ const querystring = require("querystring");
|
|
|
6
6
|
* Fix proxied body if bodyParser is involved.
|
|
7
7
|
*/
|
|
8
8
|
function fixRequestBody(proxyReq, req) {
|
|
9
|
-
|
|
9
|
+
const requestBody = req.body;
|
|
10
|
+
if (!requestBody || !Object.keys(requestBody).length) {
|
|
10
11
|
return;
|
|
11
12
|
}
|
|
12
13
|
const contentType = proxyReq.getHeader('Content-Type');
|
|
@@ -16,10 +17,10 @@ function fixRequestBody(proxyReq, req) {
|
|
|
16
17
|
proxyReq.write(bodyData);
|
|
17
18
|
};
|
|
18
19
|
if (contentType && contentType.includes('application/json')) {
|
|
19
|
-
writeBody(JSON.stringify(
|
|
20
|
+
writeBody(JSON.stringify(requestBody));
|
|
20
21
|
}
|
|
21
22
|
if (contentType === 'application/x-www-form-urlencoded') {
|
|
22
|
-
writeBody(querystring.stringify(
|
|
23
|
+
writeBody(querystring.stringify(requestBody));
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
exports.fixRequestBody = fixRequestBody;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on definition by DefinitelyTyped:
|
|
3
|
+
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/6f529c6c67a447190f86bfbf894d1061e41e07b7/types/http-proxy-middleware/index.d.ts
|
|
4
|
+
*/
|
|
1
5
|
/// <reference types="node" />
|
|
2
|
-
import * as express from 'express';
|
|
3
|
-
import * as http from 'http';
|
|
4
|
-
import * as httpProxy from 'http-proxy';
|
|
5
|
-
import * as net from 'net';
|
|
6
|
+
import type * as express from 'express';
|
|
7
|
+
import type * as http from 'http';
|
|
8
|
+
import type * as httpProxy from 'http-proxy';
|
|
9
|
+
import type * as net from 'net';
|
|
10
|
+
import type * as url from 'url';
|
|
6
11
|
export interface Request extends express.Request {
|
|
7
12
|
}
|
|
8
13
|
export interface Response extends express.Response {
|
|
@@ -19,13 +24,13 @@ export interface Options extends httpProxy.ServerOptions {
|
|
|
19
24
|
[hostOrPath: string]: httpProxy.ServerOptions['target'];
|
|
20
25
|
} | ((req: Request) => httpProxy.ServerOptions['target']) | ((req: Request) => Promise<httpProxy.ServerOptions['target']>);
|
|
21
26
|
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
22
|
-
logProvider
|
|
23
|
-
onError
|
|
24
|
-
onProxyRes
|
|
25
|
-
onProxyReq
|
|
26
|
-
onProxyReqWs
|
|
27
|
-
onOpen
|
|
28
|
-
onClose
|
|
27
|
+
logProvider?: LogProviderCallback;
|
|
28
|
+
onError?: OnErrorCallback;
|
|
29
|
+
onProxyRes?: OnProxyResCallback;
|
|
30
|
+
onProxyReq?: OnProxyReqCallback;
|
|
31
|
+
onProxyReqWs?: OnProxyReqWsCallback;
|
|
32
|
+
onOpen?: OnOpenCallback;
|
|
33
|
+
onClose?: OnCloseCallback;
|
|
29
34
|
}
|
|
30
35
|
interface LogProvider {
|
|
31
36
|
log: Logger;
|
|
@@ -35,4 +40,15 @@ interface LogProvider {
|
|
|
35
40
|
error?: Logger;
|
|
36
41
|
}
|
|
37
42
|
declare type Logger = (...args: any[]) => void;
|
|
43
|
+
export declare type LogProviderCallback = (provider: LogProvider) => LogProvider;
|
|
44
|
+
/**
|
|
45
|
+
* Use types based on the events listeners from http-proxy
|
|
46
|
+
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/51504fd999031b7f025220fab279f1b2155cbaff/types/http-proxy/index.d.ts
|
|
47
|
+
*/
|
|
48
|
+
export declare type OnErrorCallback = (err: Error, req: http.IncomingMessage, res: http.ServerResponse, target?: string | Partial<url.Url>) => void;
|
|
49
|
+
export declare type OnProxyResCallback = (proxyRes: http.IncomingMessage, req: http.IncomingMessage, res: http.ServerResponse) => void;
|
|
50
|
+
export declare type OnProxyReqCallback = (proxyReq: http.ClientRequest, req: http.IncomingMessage, res: http.ServerResponse, options: httpProxy.ServerOptions) => void;
|
|
51
|
+
export declare type OnProxyReqWsCallback = (proxyReq: http.ClientRequest, req: http.IncomingMessage, socket: net.Socket, options: httpProxy.ServerOptions, head: any) => void;
|
|
52
|
+
export declare type OnCloseCallback = (proxyRes: http.IncomingMessage, proxySocket: net.Socket, proxyHead: any) => void;
|
|
53
|
+
export declare type OnOpenCallback = (proxySocket: net.Socket) => void;
|
|
38
54
|
export {};
|
package/dist/types.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Based on definition by DefinitelyTyped:
|
|
4
|
+
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/6f529c6c67a447190f86bfbf894d1061e41e07b7/types/http-proxy-middleware/index.d.ts
|
|
5
|
+
*/
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "http-proxy-middleware",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "The one-liner node.js proxy middleware for connect, express and browser-sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "jest",
|
|
22
22
|
"precoverage": "yarn build",
|
|
23
23
|
"coverage": "jest --coverage --coverageReporters=lcov",
|
|
24
|
-
"prepare": "yarn build && rm dist/tsconfig.tsbuildinfo"
|
|
24
|
+
"prepare": "husky install && yarn build && rm dist/tsconfig.tsbuildinfo"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -51,34 +51,35 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://github.com/chimurai/http-proxy-middleware#readme",
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@commitlint/cli": "^12.
|
|
55
|
-
"@commitlint/config-conventional": "^12.
|
|
54
|
+
"@commitlint/cli": "^12.1.4",
|
|
55
|
+
"@commitlint/config-conventional": "^12.1.4",
|
|
56
56
|
"@types/express": "4.17.7",
|
|
57
57
|
"@types/is-glob": "^4.0.1",
|
|
58
|
-
"@types/jest": "^26.0.
|
|
58
|
+
"@types/jest": "^26.0.23",
|
|
59
59
|
"@types/micromatch": "^4.0.1",
|
|
60
|
-
"@types/node": "^
|
|
61
|
-
"@types/supertest": "^2.0.
|
|
62
|
-
"@types/ws": "^7.4.
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
64
|
-
"@typescript-eslint/parser": "^4.
|
|
60
|
+
"@types/node": "^15.6.2",
|
|
61
|
+
"@types/supertest": "^2.0.11",
|
|
62
|
+
"@types/ws": "^7.4.4",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^4.26.0",
|
|
64
|
+
"@typescript-eslint/parser": "^4.26.0",
|
|
65
65
|
"body-parser": "^1.19.0",
|
|
66
66
|
"browser-sync": "^2.26.14",
|
|
67
67
|
"connect": "^3.7.0",
|
|
68
|
-
"eslint": "^7.
|
|
69
|
-
"eslint-config-prettier": "^8.
|
|
70
|
-
"eslint-plugin-prettier": "^3.
|
|
68
|
+
"eslint": "^7.27.0",
|
|
69
|
+
"eslint-config-prettier": "^8.3.0",
|
|
70
|
+
"eslint-plugin-prettier": "^3.4.0",
|
|
71
71
|
"express": "^4.17.1",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
72
|
+
"get-port": "^5.1.1",
|
|
73
|
+
"husky": "^6.0.0",
|
|
74
|
+
"jest": "^27.0.3",
|
|
75
|
+
"lint-staged": "^11.0.0",
|
|
76
|
+
"mockttp": "^1.2.2",
|
|
77
|
+
"open": "^8.2.0",
|
|
78
|
+
"prettier": "^2.3.0",
|
|
78
79
|
"supertest": "^6.1.3",
|
|
79
|
-
"ts-jest": "^
|
|
80
|
-
"typescript": "^4.2
|
|
81
|
-
"ws": "^7.4.
|
|
80
|
+
"ts-jest": "^27.0.2",
|
|
81
|
+
"typescript": "^4.3.2",
|
|
82
|
+
"ws": "^7.4.6"
|
|
82
83
|
},
|
|
83
84
|
"dependencies": {
|
|
84
85
|
"@types/http-proxy": "^1.17.5",
|
|
@@ -90,12 +91,6 @@
|
|
|
90
91
|
"engines": {
|
|
91
92
|
"node": ">=12.0.0"
|
|
92
93
|
},
|
|
93
|
-
"husky": {
|
|
94
|
-
"hooks": {
|
|
95
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
96
|
-
"pre-commit": "lint-staged"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
94
|
"commitlint": {
|
|
100
95
|
"extends": [
|
|
101
96
|
"@commitlint/config-conventional"
|
package/CHANGELOG.md
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [v2.0.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.0)
|
|
4
|
-
|
|
5
|
-
- chore(package): drop node 10 [BREAKING CHANGE] ([#577](https://github.com/chimurai/http-proxy-middleware/pull/577))
|
|
6
|
-
|
|
7
|
-
## [v1.3.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.3.1)
|
|
8
|
-
|
|
9
|
-
- fix(fix-request-body): make sure the content-type exists ([#578](https://github.com/chimurai/http-proxy-middleware/pull/578)) ([oufeng](https://github.com/oufeng))
|
|
10
|
-
|
|
11
|
-
## [v1.3.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.3.0)
|
|
12
|
-
|
|
13
|
-
- docs(response interceptor): align with nodejs default utf8 ([#567](https://github.com/chimurai/http-proxy-middleware/pull/567))
|
|
14
|
-
- feat: try to proxy body even after body-parser middleware ([#492](https://github.com/chimurai/http-proxy-middleware/pull/492)) ([midgleyc](https://github.com/midgleyc))
|
|
15
|
-
|
|
16
|
-
## [v1.2.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.2.1)
|
|
17
|
-
|
|
18
|
-
- fix(response interceptor): proxy original response headers ([#563](https://github.com/chimurai/http-proxy-middleware/pull/563))
|
|
19
|
-
|
|
20
|
-
## [v1.2.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.2.0)
|
|
21
|
-
|
|
22
|
-
- feat(handler): response interceptor ([#520](https://github.com/chimurai/http-proxy-middleware/pull/520))
|
|
23
|
-
- fix(log error): handle undefined target when websocket errors ([#527](https://github.com/chimurai/http-proxy-middleware/pull/527))
|
|
24
|
-
|
|
25
|
-
## [v1.1.2](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.1.2)
|
|
26
|
-
|
|
27
|
-
- fix(log error): handle optional target ([#523](https://github.com/chimurai/http-proxy-middleware/pull/523))
|
|
28
|
-
|
|
29
|
-
## [v1.1.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.1.1)
|
|
30
|
-
|
|
31
|
-
- fix(error handler): re-throw http-proxy missing target error ([#517](https://github.com/chimurai/http-proxy-middleware/pull/517))
|
|
32
|
-
- refactor(dependency): remove `camelcase`
|
|
33
|
-
- fix(option): optional `target` when `router` is used ([#512](https://github.com/chimurai/http-proxy-middleware/pull/512))
|
|
34
|
-
|
|
35
|
-
## [v1.1.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.1.0)
|
|
36
|
-
|
|
37
|
-
- fix(errorHandler): fix confusing error message ([#509](https://github.com/chimurai/http-proxy-middleware/pull/509))
|
|
38
|
-
- fix(proxy): close proxy when server closes ([#508](https://github.com/chimurai/http-proxy-middleware/pull/508))
|
|
39
|
-
- refactor(lodash): remove lodash ([#459](https://github.com/chimurai/http-proxy-middleware/pull/459)) ([#507](https://github.com/chimurai/http-proxy-middleware/pull/507)) ([TrySound](https://github.com/TrySound))
|
|
40
|
-
- fix(ETIMEDOUT): return 504 on ETIMEDOUT ([#480](https://github.com/chimurai/http-proxy-middleware/pull/480)) ([aremishevsky](https://github.com/aremishevsky))
|
|
41
|
-
|
|
42
|
-
## [v1.0.6](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.6)
|
|
43
|
-
|
|
44
|
-
- chore(deps): lodash 4.17.20 ([#475](https://github.com/chimurai/http-proxy-middleware/pull/475))
|
|
45
|
-
|
|
46
|
-
## [v1.0.5](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.6)
|
|
47
|
-
|
|
48
|
-
- chore(deps): lodash 4.17.19 ([#454](https://github.com/chimurai/http-proxy-middleware/pull/454))
|
|
49
|
-
|
|
50
|
-
## [v1.0.4](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.4)
|
|
51
|
-
|
|
52
|
-
- chore(deps): http-proxy 1.18.1 ([#442](https://github.com/chimurai/http-proxy-middleware/pull/442))
|
|
53
|
-
|
|
54
|
-
## [v1.0.3](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.3)
|
|
55
|
-
|
|
56
|
-
- build(package): exclude build artifact tsconfig.tsbuildinfo ([#415](https://github.com/chimurai/http-proxy-middleware/pull/415))
|
|
57
|
-
|
|
58
|
-
## [v1.0.2](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.2)
|
|
59
|
-
|
|
60
|
-
- fix(router): handle rejected promise in custom router ([#410](https://github.com/chimurai/http-proxy-middleware/pull/413)) ([bforbis](https://github.com/bforbis))
|
|
61
|
-
|
|
62
|
-
## [v1.0.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.1)
|
|
63
|
-
|
|
64
|
-
- fix(typescript): fix proxyRes and router types ([#410](https://github.com/chimurai/http-proxy-middleware/issues/410)) ([dylang](https://github.com/dylang))
|
|
65
|
-
|
|
66
|
-
## [v1.0.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.0.0)
|
|
67
|
-
|
|
68
|
-
- feat(createProxyMiddleware): explicit import http-proxy-middleware ([BREAKING CHANGE](https://github.com/chimurai/http-proxy-middleware/releases))([#400](https://github.com/chimurai/http-proxy-middleware/issues/400#issuecomment-587162378))
|
|
69
|
-
- feat(typescript): export http-proxy-middleware types ([#400](https://github.com/chimurai/http-proxy-middleware/issues/400))
|
|
70
|
-
- fix(typescript): ES6 target - TS1192 ([#400](https://github.com/chimurai/http-proxy-middleware/issues/400#issuecomment-587064349))
|
|
71
|
-
|
|
72
|
-
## [v0.21.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.21.0)
|
|
73
|
-
|
|
74
|
-
- feat(http-proxy): bump to v1.18.0
|
|
75
|
-
- feat: async router ([#379](https://github.com/chimurai/http-proxy-middleware/issues/379)) ([LiranBri](https://github.com/LiranBri))
|
|
76
|
-
- feat(typescript): types support ([#369](https://github.com/chimurai/http-proxy-middleware/pull/369))
|
|
77
|
-
- feat: async pathRewrite ([#397](https://github.com/chimurai/http-proxy-middleware/pull/397)) ([rsethc](https://github.com/rsethc))
|
|
78
|
-
|
|
79
|
-
## [v0.20.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.20.0)
|
|
80
|
-
|
|
81
|
-
- fix(ws): concurrent websocket requests do not get upgraded ([#335](https://github.com/chimurai/http-proxy-middleware/issues/335))
|
|
82
|
-
- chore: drop node 6 (BREAKING CHANGE)
|
|
83
|
-
- chore: update to micromatch@4 ([BREAKING CHANGE](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md#400---2019-03-20))
|
|
84
|
-
- chore: update dev dependencies
|
|
85
|
-
- refactor: migrate to typescript ([#328](https://github.com/chimurai/http-proxy-middleware/pull/328))
|
|
86
|
-
- feat(middleware): Promise / async support ([#328](https://github.com/chimurai/http-proxy-middleware/pull/328/files#diff-7890bfeb41abb0fc0ef2670749c84077R50))
|
|
87
|
-
- refactor: remove legacy options `proxyHost` and `proxyTable` (BREAKING CHANGE)
|
|
88
|
-
|
|
89
|
-
## [v0.19.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.19.1)
|
|
90
|
-
|
|
91
|
-
- fix(log): handle case when error code is missing ([#303](https://github.com/chimurai/http-proxy-middleware/pull/303))
|
|
92
|
-
|
|
93
|
-
## [v0.19.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.19.0)
|
|
94
|
-
|
|
95
|
-
- feat(http-proxy): bump to v1.17.0 ([#261](https://github.com/chimurai/http-proxy-middleware/pull/261))
|
|
96
|
-
|
|
97
|
-
## [v0.18.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.18.0)
|
|
98
|
-
|
|
99
|
-
- fix(vulnerability): update micromatch to v3.x ([npm:braces:20180219](https://snyk.io/test/npm/http-proxy-middleware?tab=issues&severity=high&severity=medium&severity=low#npm:braces:20180219))
|
|
100
|
-
- test(node): drop node 0.x support ([#212](https://github.com/chimurai/http-proxy-middleware/pull/212))
|
|
101
|
-
|
|
102
|
-
## [v0.17.4](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.17.4)
|
|
103
|
-
|
|
104
|
-
- fix(ntlm authentication): fixed bug preventing proxying with ntlm authentication. ([#132](https://github.com/chimurai/http-proxy-middleware/pull/149)) (Thanks: [EladBezalel](https://github.com/EladBezalel), [oshri551](https://github.com/oshri551))
|
|
105
|
-
|
|
106
|
-
## [v0.17.3](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.17.3)
|
|
107
|
-
|
|
108
|
-
- fix(onError): improve default proxy error handling. http status codes (504, 502 and 500). ([#132](https://github.com/chimurai/http-proxy-middleware/pull/132)) ([graingert](https://github.com/graingert))
|
|
109
|
-
|
|
110
|
-
## [v0.17.2](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.17.2)
|
|
111
|
-
|
|
112
|
-
- feat(logging): improve error message & add link to Node errors page. ([#106](https://github.com/chimurai/http-proxy-middleware/pull/106)) ([cloudmu](https://github.com/cloudmu))
|
|
113
|
-
- feat(pathRewrite): path can be empty string. ([#110](https://github.com/chimurai/http-proxy-middleware/pull/110)) ([sunnylqm](https://github.com/sunnylqm))
|
|
114
|
-
- bug(websocket): memory leak when option 'ws:true' is used. ([#114](https://github.com/chimurai/http-proxy-middleware/pull/114)) ([julbra](https://github.com/julbra))
|
|
115
|
-
- chore(package.json): reduce package size. ([#109](https://github.com/chimurai/http-proxy-middleware/pull/109))
|
|
116
|
-
|
|
117
|
-
## [v0.17.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.17.1)
|
|
118
|
-
|
|
119
|
-
- fix(Express sub Router): 404 on non-proxy routes ([#94](https://github.com/chimurai/http-proxy-middleware/issues/94))
|
|
120
|
-
|
|
121
|
-
## [v0.17.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.17.0)
|
|
122
|
-
|
|
123
|
-
- fix(context matching): Use [RFC 3986 path](https://tools.ietf.org/html/rfc3986#section-3.3) in context matching. (excludes query parameters)
|
|
124
|
-
|
|
125
|
-
## [v0.16.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.16.0)
|
|
126
|
-
|
|
127
|
-
- deprecated(proxyTable): renamed `proxyTable` to `router`.
|
|
128
|
-
- feat(router): support for custom `router` function.
|
|
129
|
-
|
|
130
|
-
## [v0.15.2](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.15.2)
|
|
131
|
-
|
|
132
|
-
- fix(websocket): fixes websocket upgrade.
|
|
133
|
-
|
|
134
|
-
## [v0.15.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.15.1)
|
|
135
|
-
|
|
136
|
-
- feat(pathRewrite): expose `req` object to pathRewrite function.
|
|
137
|
-
- fix(websocket): fixes websocket upgrade when both config.ws and external .upgrade() are used.
|
|
138
|
-
|
|
139
|
-
## [v0.15.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.15.0)
|
|
140
|
-
|
|
141
|
-
- feat(pathRewrite): support for custom pathRewrite function.
|
|
142
|
-
|
|
143
|
-
## [v0.14.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.14.0)
|
|
144
|
-
|
|
145
|
-
- feat(proxy): support proxy creation without context.
|
|
146
|
-
- fix(connect mounting): use connect's `path` configuration to mount proxy.
|
|
147
|
-
|
|
148
|
-
## [v0.13.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.13.0)
|
|
149
|
-
|
|
150
|
-
- feat(context): custom context matcher; when simple `path` matching is not sufficient.
|
|
151
|
-
|
|
152
|
-
## [v0.12.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.12.0)
|
|
153
|
-
|
|
154
|
-
- add option `onProxyReqWs` (subscribe to http-proxy `proxyReqWs` event)
|
|
155
|
-
- add option `onOpen` (subscribe to http-proxy `open` event)
|
|
156
|
-
- add option `onClose` (subscribe to http-proxy `close` event)
|
|
157
|
-
|
|
158
|
-
## [v0.11.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.11.0)
|
|
159
|
-
|
|
160
|
-
- improved logging
|
|
161
|
-
|
|
162
|
-
## [v0.10.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.10.0)
|
|
163
|
-
|
|
164
|
-
- feat(proxyTable) - added proxyTable support for WebSockets.
|
|
165
|
-
- fixed(proxyTable) - ensure original path (not rewritten path) is being used when `proxyTable` is used in conjunction with `pathRewrite`.
|
|
166
|
-
|
|
167
|
-
## [v0.9.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.9.1)
|
|
168
|
-
|
|
169
|
-
- fix server crash when socket error not handled correctly.
|
|
170
|
-
|
|
171
|
-
## [v0.9.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.9.0)
|
|
172
|
-
|
|
173
|
-
- support subscribing to http-proxy `proxyReq` event ([trbngr](https://github.com/trbngr))
|
|
174
|
-
- add `logLevel` and `logProvider` support
|
|
175
|
-
|
|
176
|
-
## [v0.8.2](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.8.2)
|
|
177
|
-
|
|
178
|
-
- fix proxyError handler ([mTazelaar](https://github.com/mTazelaar))
|
|
179
|
-
|
|
180
|
-
## [v0.8.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.8.1)
|
|
181
|
-
|
|
182
|
-
- fix pathRewrite when `agent` is configured
|
|
183
|
-
|
|
184
|
-
## [v0.8.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.8.0)
|
|
185
|
-
|
|
186
|
-
- support external websocket upgrade
|
|
187
|
-
- fix websocket shorthand
|
|
188
|
-
|
|
189
|
-
## [v0.7.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.7.0)
|
|
190
|
-
|
|
191
|
-
- support shorthand syntax
|
|
192
|
-
- fix express/connect mounting
|
|
193
|
-
|
|
194
|
-
## [v0.6.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.6.0)
|
|
195
|
-
|
|
196
|
-
- support proxyTable
|
|
197
|
-
|
|
198
|
-
## [v0.5.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.5.0)
|
|
199
|
-
|
|
200
|
-
- support subscribing to http-proxy `error` event
|
|
201
|
-
- support subscribing to http-proxy `proxyRes` event
|
|
202
|
-
|
|
203
|
-
## [v0.4.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.4.0)
|
|
204
|
-
|
|
205
|
-
- support websocket
|
|
206
|
-
|
|
207
|
-
## [v0.3.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.3.0)
|
|
208
|
-
|
|
209
|
-
- support wildcard / glob
|
|
210
|
-
|
|
211
|
-
## [v0.2.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.2.0)
|
|
212
|
-
|
|
213
|
-
- support multiple paths
|
|
214
|
-
|
|
215
|
-
## [v0.1.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.1.0)
|
|
216
|
-
|
|
217
|
-
- support path rewrite
|
|
218
|
-
- deprecate proxyHost option
|
|
219
|
-
|
|
220
|
-
## [v0.0.5](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.0.5)
|
|
221
|
-
|
|
222
|
-
- initial release
|