Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix /server/environment endpoint for best ZSS route (v2) #589

Open
wants to merge 2 commits into
base: v2.x/staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

## 2.18.1
- 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. (#589)

## 2.17.0
- Enhancement: Added function `isClientAttls(zoweConfig)` within `libs/util.js`. Whenever a plugin makes a network request, it should always use this to determine if a normally HTTPS request should instead be made as HTTP due to AT-TLS handling the TLS when enabled. (#544)
- Bugfix: Fixed function `isServerAttls(zoweConfig)` within `libs/util.js`, which was preventing using AT-TLS with app-server. (#544)
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
Loading