elastic / enterprise-search-js

Official Node.js client for Elastic Enterprise Search, App Search, and Workplace Search.
https://www.elastic.co/guide/en/enterprise-search-clients/index.html
Apache License 2.0
2 stars 10 forks source link

feat: Add support for HTTP proxy #15

Closed mfeltscher closed 1 year ago

mfeltscher commented 2 years ago

As the title says this adds the possibility to specify a HTTP(S) proxy when accessing Enterprise Search API endpoints

elasticmachine commented 2 years ago

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

mfeltscher commented 2 years ago

@delvedor Any chance you could have a look at this?

ezimuel commented 2 years ago

@mfeltscher can you explain the need of this proxy library with an example use case? Thanks!

mfeltscher commented 2 years ago

@ezimuel The library itself is just there for the tests. I pretty much just took those from https://github.com/elastic/elastic-transport-js/blob/main/test/utils/buildProxy.ts in order to stay consistent with the way you test proxy settings in other packages.

mfeltscher commented 2 years ago

@ezimuel Any news on this?

JoshMock commented 1 year ago

Seconding @ezimuel on this one: if we want this feature, it'd be better supported in the transport layer. The better solution is actually to take advantage of Undici proxy support, which was added after we started using Undici in @elastic/transport. That's on my list of improvements in the hopefully-not-too-far future. :slightly_smiling_face: