diff --git a/apps/api/lib/helper/opJsonApiHelper.php b/apps/api/lib/helper/opJsonApiHelper.php index 896a3d6d9..4d0459137 100644 --- a/apps/api/lib/helper/opJsonApiHelper.php +++ b/apps/api/lib/helper/opJsonApiHelper.php @@ -202,7 +202,7 @@ function op_api_notification($notification) // Basically, those URLs begin with relative URL root (ex. "/subdir/member/1"). $url = $notification['url']; } - elseif (0 === strpos($notification['url'], 'http://') || 0 === strpos($notification['url'], 'https://')) + elseif (preg_match('#^https?://#i', $notification['url'])) { $url = $notification['url']; }