Hi Kevin
On Friday, 24 October 2014 18:24:00 UTC+2, Kevin Van Workum wrote:
>
> I'm trying to connect to my ES via a proxy using a client written in perl.
> What's the best way to do this?
>
> Here's what I have, and it works, but I suspect there's a more straight
> forward approach:
>
> $e = Search::Elasticsearch->new(
> cxn => 'LWP',
> nodes => 'node1:9200' );
>
> $ENV{HTTP_proxy} = "http://proxy:3128";
> $e->transport->cxn_pool->next_cxn->handle->env_proxy;
>
>
You should be able to do this using the default Cxn backend (HTTP::Tiny).
I haven't tried proxies but, according to the HTTP::Tiny docs, proxies are
supported: https://metacpan.org/pod/HTTP::Tiny#PROXY-SUPPORT
This should work:
> $ENV{http_proxy} = "http://proxy:3128";
> $e = Search::Elasticsearch->new( nodes => 'node1:9200' );
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/453ec592-e3c9-4ff4-8f5a-8e71bab901d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.