Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Remove https core module patching logic #36

Merged
merged 3 commits into from
Dec 6, 2019
Merged

Conversation

TooTallNate
Copy link
Owner

@TooTallNate TooTallNate commented Dec 2, 2019

Instead of patching over https.request() and https.get() manually
to add the secureEndpoint boolean, utilize the stack trace of the
current call logic to determine whether or not the https.js core
module is invoking new ClientRequest().

In theory, this is still fragile logic, but should be more future-proof
and cleaner than patching over a core module, which is never really
desirable.

Fixes #23.
Fixes #29.
Closes #30.
Closes #35.

Instead of patching over `https.request()` and `https.get()` manually
to add the `secureEndpoint` boolean, utilize the stack trace of the
current call logic to determine whether or not the `https.js` core
module is invoking `new ClientRequest()`.

In theory, this is still fragile logic, but should be more future-proof
and cleaner than patching over a core module, which is never really
desirable.

Fixes #29.
Closes #30.
Closes #35.
@TooTallNate TooTallNate merged commit 33af545 into master Dec 6, 2019
@TooTallNate TooTallNate deleted the remove/patch-core branch December 6, 2019 00:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant