diff --git a/lib/util.js b/lib/util.js index 1c357b1f..bcd402df 100644 --- a/lib/util.js +++ b/lib/util.js @@ -422,7 +422,7 @@ module.exports.makeRemoteUrl = function(destination, req, serverConfig) { if (destination.includes('ZWE_EXTERNAL_PORT')) { if (process.env.ZWE_zowe_externalPort) { zoweExternalPort = process.env.ZWE_zowe_externalPort; - } if (process.env.ZWE_EXTERNAL_PORT) { + } else if (process.env.ZWE_EXTERNAL_PORT) { zoweExternalPort = process.env.ZWE_EXTERNAL_PORT; } else if (serverConfig.node.mediationLayer && serverConfig.node.mediationLayer.server && serverConfig.node.mediationLayer.server.gatewayPort) { zoweExternalPort = serverConfig.node.mediationLayer.server.gatewayPort;