Skip to content

Commit

Permalink
Merge pull request #588 from zowe/bugfix/v3/best-zss-route
Browse files Browse the repository at this point in the history
Fix /server/environment endpoint for best ZSS route (v3)
  • Loading branch information
1000TurquoisePogs authored Jan 31, 2025
2 parents 5dedcdf + a8ec979 commit 2233f6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
All notable changes to the Zlux Server Framework package will be documented in this file.
This repo is part of the app-server Zowe Component, and the change logs here may appear on Zowe.org in that section.

## 3.2.0
- Bugfix: App-server /server/environment endpoint was missing the "agent" object, causing the Desktop to choose an indirect route to accessing ZSS. This fix improves latency and high availability behavior of ZSS APIs in the Desktop. (#588)

## 3.1.0
- Bugfix: App-server could not register with discovery server when AT-TLS was enabled for app-server. (#580)

Expand Down
7 changes: 4 additions & 3 deletions lib/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ const hostname = os.hostname();
function getUserEnv(rbac, zoweConfig){
var date = new Date();
return new Promise(function(resolve, reject){
const nodeConfig = zoweConfig.components['app-server'].node;
const serverConfig = zoweConfig.components['app-server'];
const nodeConfig = serverConfig.node;
if (rbac) {
resolve({
"timestamp": date.toUTCString(),
Expand All @@ -248,7 +249,7 @@ function getUserEnv(rbac, zoweConfig){
"hostname": hostname,
"userEnvironment": process.env,
"agent": {
"mediationLayer": nodeConfig.agent?.mediationLayer
"mediationLayer": serverConfig.agent?.mediationLayer
},
"PID": process.pid,
"PPID": process.ppid,
Expand Down Expand Up @@ -279,7 +280,7 @@ function getUserEnv(rbac, zoweConfig){
"GATEWAY_PORT": nodeConfig.mediationLayer.server.gatewayPort,
},
"agent": {
"mediationLayer": nodeConfig.agent?.mediationLayer
"mediationLayer": serverConfig.agent?.mediationLayer
}
})
}
Expand Down

0 comments on commit 2233f6b

Please sign in to comment.