Skip to content

Commit c7c332a

Browse files
committed
http-proxy-middleware@3
1 parent b387f8c commit c7c332a

File tree

4 files changed

+512
-249
lines changed

4 files changed

+512
-249
lines changed

lib/handlers/auth-proxy.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import debug from '../debug.mjs'
66
import allow from './allow.mjs'
77

88
const PROXY_SETTINGS = {
9-
logLevel: 'silent',
109
changeOrigin: true
1110
}
1211
const REQUIRED_PERMISSIONS = {
@@ -31,8 +30,10 @@ function addAuthProxyHandler (app, sourcePath, target) {
3130
const sourcePathLength = sourcePath.length
3231
const settings = Object.assign({
3332
target,
34-
onProxyReq: addAuthHeaders,
35-
onProxyReqWs: addAuthHeaders,
33+
on: {
34+
proxyReq: addAuthHeaders,
35+
proxyReqWs: addAuthHeaders
36+
},
3637
pathRewrite: path => path.substr(sourcePathLength)
3738
}, PROXY_SETTINGS)
3839

lib/handlers/cors-proxy.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ const CORS_SETTINGS = {
1414
origin: true
1515
}
1616
const PROXY_SETTINGS = {
17-
target: 'dynamic',
18-
logLevel: 'silent',
17+
target: 'http://placeholder',
1918
changeOrigin: true,
2019
followRedirects: true,
2120
proxyTimeout: 10000,

0 commit comments

Comments
 (0)