Skip to content

Commit a2ef634

Browse files
committed
use the object, skip verify on ssl for now
1 parent 76480c9 commit a2ef634

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

solid/lib/Notifications/SolidWebhook.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function send($path, $type) {
1515
$webhooks = $this->getWebhooks($path);
1616
foreach ($webhooks as $webhook) {
1717
try {
18-
$this->postUpdate($webhook['url'], $path, $type);
18+
$this->postUpdate($webhook->{'url'}, $path, $type);
1919
} catch(\Exception $e) {
2020
// FIXME: add retry code here?
2121
}
@@ -28,11 +28,15 @@ private function getWebhooks($path) {
2828
private function postUpdate($webhookUrl, $path, $type) {
2929
try {
3030
$postData = $this->createUpdatePayload($path, $type);
31-
$opts = array('http' =>
32-
array(
31+
$opts = array(
32+
'http' => array(
3333
'method' => 'POST',
3434
'header' => 'Content-Type: application/ld+json',
3535
'content' => $postData
36+
),
37+
'ssl' => array(
38+
'verify_peer' => false, // FIXME: Do we need to be more strict here?
39+
'verify_peer_name' => false
3640
)
3741
);
3842
$context = stream_context_create($opts);

0 commit comments

Comments
 (0)