Skip to content

Commit

Permalink
DHLGW-1362: disable client-side schema validation in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mam08ixo committed Sep 15, 2023
1 parent be55d2f commit 2cac5be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Service/ServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ private function createRestService(
throw ServiceExceptionFactory::createServiceException($exception);
}

$httpServiceFactory = new HttpServiceFactory($httpClient, $this->userAgent);
if ($sandboxMode) {
$httpServiceFactory = new HttpServiceFactory($httpClient, $this->userAgent);
} else {
$httpServiceFactory = HttpServiceFactory::withSchemaValidationDisabled($httpClient, $this->userAgent);
}

return $httpServiceFactory->createShipmentService($authStorage, $logger, $sandboxMode);
}

Expand Down

0 comments on commit 2cac5be

Please sign in to comment.