Skip to content

Commit

Permalink
Merge pull request #418 from zowe/feature/v2/merge-v1
Browse files Browse the repository at this point in the history
Merge v1 changes into v2
  • Loading branch information
DivergentEuropeans authored Apr 12, 2022
2 parents f0cd9ee + 038047d commit 09e6850
Show file tree
Hide file tree
Showing 5 changed files with 2,865 additions and 52 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ jobs:

- name: '[Prep 7] deploy'
uses: zowe-actions/zlux-builds/core/[email protected]/main

3 changes: 2 additions & 1 deletion lib/apiml.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ const MEDIATION_LAYER_INSTANCE_DEFAULTS = (zluxProto, zluxHostname, zluxPort) =>
+' Proxy Server',
'mfaas.api-info.apiVersionProperties.v1.version': '1.0.0',
'mfaas.api-info.apiVersionProperties.v1.version': '1.0.0',
'apiml.apiInfo.api-v1.swaggerUrl':`${zluxProto}://${zluxHostname}:${zluxPort}/api-docs/server`
'apiml.apiInfo.api-v1.swaggerUrl':`${zluxProto}://${zluxHostname}:${zluxPort}/api-docs/server`,
'apiml.authentication.scheme': 'zoweJwt'
}
}};

Expand Down
7 changes: 3 additions & 4 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,14 @@ module.exports.getRemoteIframeTemplate = function(remoteUrl) {

module.exports.makeRemoteUrl = function(destination, req, serverConfig) {
let referer = req.get('Referer');
let hostname = referer === '' ? '' : new URL(referer).hostname;
loggers.utilLogger.debug(`referer: ${referer}`);

let zoweExternalHost;
let zoweExternalPort;

if(destination.includes('ZOWE_EXTERNAL_HOST') || destination.includes('ZWE_EXTERNAL_HOST')) {
if( hostname > '') {
zoweExternalHost = hostname;
if( referer > '') {
zoweExternalHost = referer.split(':')[1].substring(2);
} else if (process.env.ZWE_EXTERNAL_HOST) {
zoweExternalHost = process.env.ZWE_EXTERNAL_HOST;
} else if (process.env.ZOWE_EXTERNAL_HOST) {
Expand Down
Loading

0 comments on commit 09e6850

Please sign in to comment.