Skip to content
Permalink
Browse files

0.68.20 Add ca-bundle for better SSL support in web-requests

  • Loading branch information...
brakerb committed Jun 7, 2019
1 parent 92e7392 commit e4a7e52a5a1550eda34efbd5051dee6133e5a84d
Showing with 65 additions and 5 deletions.
  1. +2 −1 composer.json
  2. +58 −2 composer.lock
  3. +5 −2 core/Classes/RestClient.php
@@ -7,6 +7,7 @@
"latte/latte" : "^2.4",
"illuminate/pagination" : "^5.6",
"symfony/process" : "^4.2",
"symfony/event-dispatcher" : "^4.2"
"symfony/event-dispatcher" : "^4.2",
"composer/ca-bundle": "^1.1"
}
}

Some generated files are not rendered by default. Learn more.

@@ -3,8 +3,10 @@
namespace esc\Classes;
use Composer\CaBundle\CaBundle;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\RequestOptions;
/**
* Class RestClient
@@ -57,7 +59,7 @@ public static function getClient(): Client
*/
public static function get(string $url, array $options = null): Response
{
if(isDebug()){
if (isDebug()) {
Log::logAddLine('RestClient', 'Requesting GET: ' . $url, isDebug());
}
@@ -75,7 +77,7 @@ public static function get(string $url, array $options = null): Response
*/
public static function post(string $url, array $options = null): Response
{
if(isDebug()) {
if (isDebug()) {
Log::logAddLine('RestClient', 'Requesting GET: ' . $url . ' with options: ' . json_encode($options), isDebug());
}
@@ -93,6 +95,7 @@ private static function addUserAgent(array $options = null): array
$options['headers'] = [];
}
$options[RequestOptions::VERIFY] = CaBundle::getSystemCaRootBundlePath();
$options['headers']['User-Agent'] = sprintf('EvoSC/%s PHP/7.2', getEscVersion());
return $options;

0 comments on commit e4a7e52

Please sign in to comment.
You can’t perform that action at this time.