mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
* Sonarcloud issues fixes * Code smell fixes * Refactoring to remove new code duplications * Sonarcloud code smell fixes part I * Sonarcloud code smell fixes part II * Missing code smell fix * Add new ESLint rules to cover fixed SonarCloud issues * Add missing command * Add missing is existing check
27 lines
767 B
JavaScript
27 lines
767 B
JavaScript
require('@alfresco/adf-cli/tooling').dotenvConfig({ path: process.env.ENV_FILE });
|
|
|
|
const { BASE_URL } = process.env;
|
|
|
|
module.exports = {
|
|
"/alfresco": {
|
|
"target": BASE_URL,
|
|
"secure": false,
|
|
"pathRewrite": {
|
|
"^/alfresco/alfresco": ""
|
|
},
|
|
"changeOrigin": true,
|
|
'logLevel': 'debug',
|
|
onProxyReq: function(request) {
|
|
if(request["method"] !== "GET")
|
|
request.setHeader("origin", BASE_URL);
|
|
},
|
|
// workaround for REPO-2260
|
|
onProxyRes: function (proxyRes) {
|
|
const header = proxyRes.headers['www-authenticate'];
|
|
if (header?.startsWith('Basic')) {
|
|
proxyRes.headers['www-authenticate'] = 'x' + header;
|
|
}
|
|
}
|
|
}
|
|
};
|