alfresco-ng2-components/e2e/lite-server-proxy.js
cristinaj 339a6e7a18 [ADF-4587] Fix e2e tests (#4757)
* Fix user_info test

* Removing duplication and hardcoded protocol

* Fix linting and update script

* Removing hardcoded protocol

* Add protocol to scripts

* Fix C260117

* Enable screenshots for cloud tests

* Update process-services-cloud-e2e.sh
2019-05-22 10:15:12 +01:00

32 lines
861 B
JavaScript

var PROXY_HOST_ADF = process.env.PROXY_HOST_ADF;
var HOST = process.env.URL_HOST_ADF;
let proxy = require('http-proxy-middleware');
let targetProxy = (PROXY_HOST_ADF || HOST);
let fallback = require('connect-history-api-fallback');
module.exports = {
'port': 4200,
open: false,
server: {
middleware: {
1: proxy('/alfresco', {
target: targetProxy,
changeOrigin: true,
pathRewrite: {
"^/alfresco/alfresco": ""
}
}),
2: proxy('/activiti-app', {
target: targetProxy,
changeOrigin: true,
"pathRewrite": {
"^/activiti-app/activiti-app": ""
}
}),
3: fallback({index: '/index.html', verbose: true})
}
}
};