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

feat: disable certificate validation for localhost #332

Merged
merged 2 commits into from
Feb 13, 2020

Conversation

connor4312
Copy link
Member

Also improves the isLoopback check to do a DNS lookup to handle any
hosts configuration or exotic addresses.

Fixes #309

Also improves the `isLoopback` check to do a DNS lookup to handle any
hosts configuration or exotic addresses.

Fixes #309
@connor4312 connor4312 force-pushed the disable-validation-on-loopback branch from 159f3f6 to 4c2f56c Compare February 12, 2020 22:58
const driver = url.startsWith('https://') ? https : http;
const isInsecure = url.startsWith('http://');
const driver = isInsecure ? http : https;
const rejectUnauthorized = !isInsecure && !(await isLoopback(url));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: double negative on the isInsecure, would read easier if it was flipped to isSecure

@connor4312 connor4312 force-pushed the disable-validation-on-loopback branch from 09931b1 to 3febde3 Compare February 13, 2020 15:51
@connor4312 connor4312 force-pushed the disable-validation-on-loopback branch from 3febde3 to 125376e Compare February 13, 2020 16:00
@connor4312 connor4312 merged commit 5736338 into master Feb 13, 2020
@connor4312 connor4312 deleted the disable-validation-on-loopback branch February 13, 2020 16:15
@connor4312 connor4312 added this to the February 2020 milestone Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source maps broken on default dotnet core ASP.NET (Angular) app
3 participants