From 8bba4f50f38217ca8b669a07dfed6bb5c1f5c819 Mon Sep 17 00:00:00 2001 From: Javier Pedemonte Date: Fri, 19 Jan 2024 17:27:14 -0600 Subject: [PATCH] chore: upgrade http-proxy-middleware --- examples/discovery-search-app/package.json | 2 +- .../discovery-search-app/src/setupProxy.js | 4 ++-- yarn.lock | 20 ++++--------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/examples/discovery-search-app/package.json b/examples/discovery-search-app/package.json index afa221a81..d20ee8fb3 100644 --- a/examples/discovery-search-app/package.json +++ b/examples/discovery-search-app/package.json @@ -32,7 +32,7 @@ "cors": "^2.8.5", "dotenv": "^16.3.2", "express": "^4.18.2", - "http-proxy-middleware": "^0.20.0", + "http-proxy-middleware": "^2.0.6", "ibm-watson": "^8.0.0", "node-polyfill-webpack-plugin": "^3.0.0", "proper-url-join": "^2.1.1", diff --git a/examples/discovery-search-app/src/setupProxy.js b/examples/discovery-search-app/src/setupProxy.js index 3835b4689..04990f59d 100644 --- a/examples/discovery-search-app/src/setupProxy.js +++ b/examples/discovery-search-app/src/setupProxy.js @@ -1,6 +1,6 @@ const path = require('path'); const dotenv = require('dotenv'); -const proxy = require('http-proxy-middleware'); +const { createProxyMiddleware } = require('http-proxy-middleware'); const { getAuthenticatorFromEnvironment } = require('ibm-watson/auth'); const cors = require('cors'); const bodyParser = require('body-parser'); @@ -36,7 +36,7 @@ if (process.env.REACT_APP_CYPRESS_MODE) { app.use( '/api', addAuthorization, - proxy({ + createProxyMiddleware({ target, secure: false, changeOrigin: true, diff --git a/yarn.lock b/yarn.lock index 8dbcf389a..686485e16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11276,7 +11276,7 @@ __metadata: cypress: "npm:^13.6.3" dotenv: "npm:^16.3.2" express: "npm:^4.18.2" - http-proxy-middleware: "npm:^0.20.0" + http-proxy-middleware: "npm:^2.0.6" ibm-watson: "npm:^8.0.0" node-polyfill-webpack-plugin: "npm:^3.0.0" proper-url-join: "npm:^2.1.1" @@ -14575,19 +14575,7 @@ __metadata: languageName: node linkType: hard -"http-proxy-middleware@npm:^0.20.0": - version: 0.20.0 - resolution: "http-proxy-middleware@npm:0.20.0" - dependencies: - http-proxy: "npm:^1.17.0" - is-glob: "npm:^4.0.1" - lodash: "npm:^4.17.14" - micromatch: "npm:^4.0.2" - checksum: bf7db2d45ee401b073e0c222f07da7299dcb14cba262db6e8025d94306773b868f941f039bc25459b94376860c6fdb976efa84a9109f1ba16f4e900ae5cf68da - languageName: node - linkType: hard - -"http-proxy-middleware@npm:^2.0.3": +"http-proxy-middleware@npm:^2.0.3, http-proxy-middleware@npm:^2.0.6": version: 2.0.6 resolution: "http-proxy-middleware@npm:2.0.6" dependencies: @@ -14605,7 +14593,7 @@ __metadata: languageName: node linkType: hard -"http-proxy@npm:^1.17.0, http-proxy@npm:^1.18.1": +"http-proxy@npm:^1.18.1": version: 1.18.1 resolution: "http-proxy@npm:1.18.1" dependencies: @@ -17311,7 +17299,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0": +"lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c