Skip to content

Commit

Permalink
Bump Http Proxy Middleware, legacy adapter (#7291)
Browse files Browse the repository at this point in the history
  • Loading branch information
baarkerlounger authored Nov 5, 2024
1 parent f80fd38 commit ab4b1d3
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 32 deletions.
81 changes: 55 additions & 26 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"govuk-react": "^0.10.7",
"hawk": "^9.0.2",
"history": "^4.10.1",
"http-proxy-middleware": "^2.0.4",
"http-proxy-middleware": "^3.0.0",
"joi": "^17.13.1",
"lodash": "^4.17.21",
"markdown-it": "^14.0.0",
Expand Down Expand Up @@ -226,4 +226,4 @@
"tough-cookie": "4.1.3",
"jsonpath-plus": "10.0.0"
}
}
}
4 changes: 2 additions & 2 deletions src/apps/__export-wins-review/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createProxyMiddleware } = require('http-proxy-middleware')
const { legacyCreateProxyMiddleware } = require('http-proxy-middleware')

const config = require('../../config')

Expand All @@ -7,7 +7,7 @@ module.exports = (app) => {
// any other authorization and we don't want any cookie to be set
app.use(
'/api-proxy/v4/export-win/review/',
createProxyMiddleware({
legacyCreateProxyMiddleware({
target: config.apiRoot,
changeOrigin: true,
pathRewrite: {
Expand Down
4 changes: 2 additions & 2 deletions src/middleware/api-proxy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createProxyMiddleware } = require('http-proxy-middleware')
const { legacyCreateProxyMiddleware } = require('http-proxy-middleware')

const config = require('../config')
const getZipkinHeaders = require('../lib/get-zipkin-headers')
Expand Down Expand Up @@ -95,7 +95,7 @@ const ALLOWLIST = [
module.exports = (app) => {
app.use(
ALLOWLIST.map((apiPath) => API_PROXY_PATH + apiPath),
createProxyMiddleware('/', {
legacyCreateProxyMiddleware('/', {
changeOrigin: true,
target: config.apiRoot,
pathRewrite: {
Expand Down

0 comments on commit ab4b1d3

Please sign in to comment.