Skip to content

Conversation

@dowlingw
Copy link

Adds support for proxy server and configuration.

Can confirm this approach works using the corporate proxy at my employer.
Other attempts using nodes inbuilt http/https modules did not work.

Just going to park this here over the weekend to get some feedback from the maintainers.

I'm not sure what testing makes sense, as this quickly gets into testing inside request module.

@coveralls
Copy link

coveralls commented Nov 23, 2018

Pull Request Test Coverage Report for Build 282

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 93.01%

Files with Coverage Reduction New Missed Lines %
lib/util/url.js 1 86.79%
lib/resolvers/http.js 1 92.5%
Totals Coverage Status
Change from base Build 278: 0.2%
Covered Lines: 653
Relevant Lines: 689

💛 - Coveralls
@JamesMessinger
Copy link
Member

Thanks for the PR! I'll review it soon and get it merged 👍

@JamesMessinger
Copy link
Member

request is a great package for Node.js apps, but json-schema-ref-parser is also used in many web apps. AFAIK, request doesn't officially support browser usage, so there's risk of things not working for web apps. Adding request also brings in 48 new dependencies, which will bloat the size of the browser bundle significantly.

Proxy support is something that would only be needed in Node.js, not web apps (since the browser is responsible for proxy support). So perhaps there's a way to refactor the HTTP resolver so that the proxy-related code is only imported by Node.js and not by Browserify.

@JamesMessinger JamesMessinger added enhancement changes requested Some code changes are required before the PR can be merged labels Dec 3, 2018
@dowlingw
Copy link
Author

dowlingw commented Dec 7, 2018

Yeah that's fair.

I did note that withCredentials isn't explicitly supported by request during development, though didn't join the dots to it not supporting browser use entirely.

Will have a noodle over this and see if I can come back with something better, cheers :)

@dowlingw
Copy link
Author

dowlingw commented Jan 8, 2020

Closing as I haven't been able to come back to this, sorry! :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Some code changes are required before the PR can be merged enhancement

4 participants