proxy settings for basic auth

This commit is contained in:
Denys Vuika 2017-10-24 17:05:57 +01:00
parent 1b0947e704
commit 4f30ee0700
3 changed files with 15 additions and 8 deletions

View File

@ -77,7 +77,7 @@
"styleExt": "scss",
"component": {},
"serve": {
"proxyConfig": "proxy.conf.json",
"proxyConfig": "proxy.conf.js",
"port": 3000
}
}

14
proxy.conf.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
"/alfresco": {
"target": "http://0.0.0.0:8080",
"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;
}
}
}
};

View File

@ -1,7 +0,0 @@
{
"/alfresco": {
"target": "http://0.0.0.0:8080",
"secure": false,
"changeOrigin": true
}
}