Skip to content

chore(deps): upgrade http-proxy-middleware #2750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const semver = require('semver');
const killable = require('killable');
const chokidar = require('chokidar');
const express = require('express');
const httpProxyMiddleware = require('http-proxy-middleware');
const { createProxyMiddleware } = require('http-proxy-middleware');
const historyApiFallback = require('connect-history-api-fallback');
const compress = require('compression');
const serveIndex = require('serve-index');
Expand Down Expand Up @@ -259,7 +259,7 @@ class Server {
// It is possible to use the `bypass` method without a `target`.
// However, the proxy middleware has no use in this case, and will fail to instantiate.
if (proxyConfig.target) {
return httpProxyMiddleware(context, proxyConfig);
return createProxyMiddleware(context, proxyConfig);
}
};
/**
Expand Down
107 changes: 71 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"del": "^4.1.1",
"express": "^4.17.1",
"html-entities": "^1.3.1",
"http-proxy-middleware": "0.19.1",
"http-proxy-middleware": "1.0.5",
"import-local": "^2.0.0",
"internal-ip": "^4.3.0",
"ip": "^1.1.5",
Expand Down
3 changes: 1 addition & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
"updateTypes": ["digest", "pin", "patch", "minor"],
"enabled": false
}
],
"ignoreDeps": ["http-proxy-middleware"]
]
}
4 changes: 2 additions & 2 deletions test/e2e/ClientOptions.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const express = require('express');
const httpProxy = require('http-proxy-middleware');
const { createProxyMiddleware } = require('http-proxy-middleware');
const request = require('supertest');
const testServer = require('../helpers/test-server');
const config = require('../fixtures/client-config/webpack.config');
Expand All @@ -14,7 +14,7 @@ describe('Client code', () => {
const proxy = express();
proxy.use(
'/',
httpProxy({
createProxyMiddleware({
target: `http://localhost:${port1}`,
ws: true,
changeOrigin: true,
Expand Down