proxy setup to fix native login dialog (for local runs) (#2363)

This commit is contained in:
Denys Vuika
2017-09-21 11:25:56 +01:00
committed by Eugenio Romano
parent 4f84079a19
commit b28a5b2a69

View File

@@ -152,6 +152,15 @@ module.exports = {
},
pathRewrite: {
'^/ecm': ''
},
secure: false,
changeOrigin: true,
// workaround for REPO-2260
onProxyRes: function (proxyRes, req, res) {
const header = proxyRes.headers['www-authenticate'];
if (header && header.startsWith('Basic')) {
proxyRes.headers['www-authenticate'] = 'x' + header;
}
}
},
'/bpm': {
@@ -162,6 +171,15 @@ module.exports = {
},
pathRewrite: {
'^/bpm': ''
},
secure: false,
changeOrigin: true,
// workaround
onProxyRes: function (proxyRes, req, res) {
const header = proxyRes.headers['www-authenticate'];
if (header && header.startsWith('Basic')) {
proxyRes.headers['www-authenticate'] = 'x' + header;
}
}
}
}