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

fix: only access the proxy-enabled extension if we need to #1092

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

erunion
Copy link
Member

@erunion erunion commented Dec 7, 2020

🧰 What's being changed?

  • Changes @readme/oas-to-har to only look for the x-proxy-enabled OAS extension if the option to do so has been passed into the library.

@erunion erunion requested review from Dashron and gratcliff December 7, 2020 20:22
// TODO look to move this to Oas class as well
if (proxyEnabled && opts.proxyUrl) {
har.url = `https://try.readme.io/${har.url}`;
if (opts.proxyUrl) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we not need to check for proxyEnabled any longer?

Copy link
Member Author

Choose a reason for hiding this comment

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

proxyEnabled was the result of the getExtension call and is still in use on line 85.

Copy link
Contributor

@Dashron Dashron left a comment

Choose a reason for hiding this comment

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

code looks good

@erunion erunion merged commit c1ac336 into next Dec 8, 2020
@erunion erunion deleted the fix/only-access-proxy-if-we-need-it branch December 8, 2020 16:28
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.

3 participants