Skip to content

Commit 28030c5

Browse files
committed
docs(router): clean up old proxyTable references
1 parent f670d6e commit 28030c5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ var options = {
110110
'^/old/api' : '/new/api', // rewrite path
111111
'^/remove/api' : '/api' // remove path
112112
},
113-
proxyTable: {
113+
router: {
114114
// when request.headers.host == 'dev.localhost:3000',
115115
// override target 'http://www.example.org' to 'http://localhost:8000'
116116
'dev.localhost:3000' : 'http://localhost:8000'

lib/logger.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ function Logger() {
143143

144144
/**
145145
* -> normal proxy
146-
* => proxyTable
146+
* => router
147147
* ~> pathRewrite
148-
* ≈> proxyTable + pathRewrite
148+
* ≈> router + pathRewrite
149149
*/
150150
function getArrow(originalPath, newPath, originalTarget, newTarget) {
151151
var arrow = ['>'];

test/e2e/websocket.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ describe('E2E WebSocket proxy', function() {
113113
});
114114
});
115115

116-
describe('with proxyTable and pathRewrite', function() {
116+
describe('with router and pathRewrite', function() {
117117

118118
beforeEach(function() {
119119
proxyServer.close();
120120
// override
121-
proxy = proxyMiddleware('ws://notworkinghost:6789', {proxyTable: {'/socket': 'ws://localhost:8000'}, pathRewrite: {'^/socket': ''}});
121+
proxy = proxyMiddleware('ws://notworkinghost:6789', {router: {'/socket': 'ws://localhost:8000'}, pathRewrite: {'^/socket': ''}});
122122
proxyServer = createServer(3000, proxy);
123123
});
124124

test/unit/logger.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ describe('getArrow', function() {
236236
});
237237
});
238238

239-
describe('"proxyTable" arrow', function() {
239+
describe('"router" arrow', function() {
240240
beforeEach(function() {
241241
arrow = getArrow('/api', '/api', 'localhost:1337', 'localhost:8888');
242242
});
@@ -246,7 +246,7 @@ describe('getArrow', function() {
246246
});
247247
});
248248

249-
describe('"pathRewrite" + "proxyTable" arrow', function() {
249+
describe('"pathRewrite" + "router" arrow', function() {
250250
beforeEach(function() {
251251
arrow = getArrow('/api', '/rest', 'localhost:1337', 'localhost:8888');
252252
});

0 commit comments

Comments
 (0)