-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: add fallback for searching a proper client certificate for a host [INS-3680] #7259
Conversation
@@ -38,6 +38,12 @@ describe('urlMatchesCertHost', () => { | |||
expect(urlMatchesCertHost(certificateHost, requestUrl)).toBe(false); | |||
}); | |||
|
|||
it('should return true if the request URL and certificate host have different ports and the needCheckPort parameter is false', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the case below return true?
const requestUrl = 'https://www.example.org:1234/some/resources?query=1';
const certificateHost = 'https://www.example.org';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I added more test cases and the results are meet the requirements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably we should consider to add a test case as @notjaywu proposed, otherwise lgtm.
305fe7c
to
898d82d
Compare
898d82d
to
4b2ae87
Compare
changes:
needCheckPort
in urlMatchesCertHost