mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-03-07 15:16:40 +08:00
Bundle certificate (fix #36)
This commit is contained in:
parent
ff4fa1eefa
commit
ade8b0e5a6
@ -107,7 +107,9 @@ class MarketController extends Controller
|
||||
if (app()->environment('testing') || ! $this->registryCache) {
|
||||
try {
|
||||
$pluginsJson = $this->guzzle->request(
|
||||
'GET', config('plugins.registry')
|
||||
'GET',
|
||||
config('plugins.registry'),
|
||||
['verify' => resource_path('misc/ca-bundle.crt')],
|
||||
)->getBody();
|
||||
} catch (Exception $e) {
|
||||
throw new Exception(trans('admin.plugins.market.connection-error', [
|
||||
|
@ -70,7 +70,11 @@ class UpdateController extends Controller
|
||||
$acceptableSpec = 1;
|
||||
if (! $this->info) {
|
||||
try {
|
||||
$json = $this->guzzle->request('GET', $this->updateSource)->getBody();
|
||||
$json = $this->guzzle->request(
|
||||
'GET',
|
||||
$this->updateSource,
|
||||
['verify' => resource_path('misc/ca-bundle.crt')],
|
||||
)->getBody();
|
||||
$info = json_decode($json, true);
|
||||
if (Arr::get($info, 'spec') == $acceptableSpec) {
|
||||
$this->info = $info;
|
||||
|
@ -23,6 +23,7 @@ class Captcha implements Rule
|
||||
'secret' => $secretkey,
|
||||
'response' => $value,
|
||||
],
|
||||
'verify' => resource_path('misc/ca-bundle.crt'),
|
||||
]);
|
||||
if ($response->getStatusCode() == 200) {
|
||||
$body = json_decode((string) $response->getBody());
|
||||
|
@ -29,6 +29,7 @@ class PackageManager
|
||||
$this->guzzle->request('GET', $url, [
|
||||
'sink' => $path,
|
||||
'progress' => $this->onProgress,
|
||||
'verify' => resource_path('misc/ca-bundle.crt'),
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
throw new Exception(trans('admin.download.errors.download', ['error' => $e->getMessage()]));
|
||||
|
3401
resources/misc/ca-bundle.crt
Executable file
3401
resources/misc/ca-bundle.crt
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user