Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Support https requests without certificate authentication #19

Merged
merged 2 commits into from
May 6, 2019

Conversation

yeajung
Copy link
Contributor

@yeajung yeajung commented May 3, 2019

Sample command for endpoint with HTTPS protocol:
./perf-top-linux --dashboard NodeAnalysis --endpoint https://localhost:9600

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yeajung yeajung requested a review from ditac May 3, 2019 21:46
@@ -73,8 +76,13 @@ function makeHttpRequest (httpOptions, done) {
done(rawData);
});
};

var req = http.request(httpOptions, respond);
var protocol = http;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think client might be a better name for this variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

protocol = https;
urlOptions.rejectUnauthorized = false;
}
var protocol = (urlOptions.protocol == "https:") ? https : http;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to be doing this twice. We can remove the if block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Removed the repetition.

@yeajung yeajung changed the title Support https requests with self-signed certificates Support https requests without certificate authentication May 6, 2019
@yeajung yeajung merged commit 5659eb0 into master May 6, 2019
@yeajung yeajung deleted the yjung-https branch May 6, 2019 17:04
@yeajung yeajung mentioned this pull request May 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants