Shopware6: Optionalen Proxy erlauben und Protokoll http oder https initialisieren
[kivitendo-erp.git] / SL / ShopConnector / Shopware6.pm
index 9944b33..38ec37f 100644 (file)
@@ -710,6 +710,9 @@ sub init_connector {
   my ($self) = @_;
 
   my $client = REST::Client->new(host => $self->config->server);
+
+  $client->getUseragent()->proxy([$self->config->protocol], $self->config->proxy) if $self->config->proxy;
+
   $client->addHeader('Content-Type', 'application/json');
   $client->addHeader('charset',      'UTF-8');
   $client->addHeader('Accept',       'application/json');