X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/68d61d09651529193e2d2e48c9194862b9d8fcaa..252dde05575226a67727bc088078575d1d6ab8ce:/SL/ShopConnector/Shopware6.pm diff --git a/SL/ShopConnector/Shopware6.pm b/SL/ShopConnector/Shopware6.pm index 38ec37f97..bd5432914 100644 --- a/SL/ShopConnector/Shopware6.pm +++ b/SL/ShopConnector/Shopware6.pm @@ -709,10 +709,10 @@ sub set_orderstatus { sub init_connector { my ($self) = @_; - my $client = REST::Client->new(host => $self->config->server); + my $protocol = $self->config->server =~ /(^https:\/\/|^http:\/\/)/ ? '' : $self->config->protocol . '://'; + my $client = REST::Client->new(host => $protocol . $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');