const fePort = 8181;
const feHost = "localhost";
const protocol="http";
-const isDirectToFE = false;
+const isDirectToFE = true;
-/*
-For kubernetes
-const fePort = 30207;
-const wfPort = 30256;
-const feHost = "kubernetes_master";
-const protocol="https";
-const isDirectToFE = true;// whether to proxy to the k8s proxy or to the BE
-*/
const portalCookieValue = "randomValue"; //for dev solely, in production - the webseal would add the cookie by itself.
module.exports = function (env) {
secure: false,
logLevel: 'debug'
}
- if (isDirectToFE) {
- feProxyOptions.pathRewrite= {
- '^/sdc1/feProxy/rest' : '/sdc1/feProxy/rest'
- }
- } else {
- feProxyOptions.pathRewrite= {
- '^/sdc1/feProxy/rest' : '/sdc2/rest'
- }
- }
+ if (!isDirectToFE) {
+ feProxyOptions.pathRewrite= {
+ '^/sdc1/feProxy/rest' : '/sdc2/rest'
+ }
+ }
middlewares.push(
proxy(['/sdc1/feProxy/rest'], feProxyOptions));
+ // Redirect all '/sdc1/feProxy/uicache' to feHost
+ middlewares.push(
+ proxy(['/sdc1/feProxy/uicache'], {
+ target: protocol + '://' + feHost + ':' + fePort,
+ changeOrigin: true,
+ secure: false
+ }));
+
// Redirect all '/sdc1/rest' to feHost
middlewares.push(
proxy(['/sdc1/rest'],{
// Redirect workflow urls to feHost
middlewares.push(
- proxy(['/sdc1/feProxy/wf', '/wf'], {
- target: protocol + '://' + feHost + ':' + wfPort,
+ proxy(['/wf', '/sdc1/feProxy/wf'], {
+ target: protocol + '://' + feHost + ':' + fePort,
changeOrigin: true,
logLevel: 'debug',
secure: false,
- pathRewrite: {
- '^/sdc1/feProxy' : ''
- },
onProxyRes: (proxyRes, req, res) => {
let setCookie = proxyRes.headers['set-cookie'];
if (setCookie) {