Commit 65bcf4b6 authored by 王源's avatar 王源
Browse files

处理shopify请求信任任何证书

parent 9164e00f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ class CurlRequest
        curl_setopt($ch, CURLOPT_TIMEOUT, 100); // 设置超时限制防止死循环
        curl_setopt($ch, CURLOPT_HEADER, true);
        curl_setopt($ch, CURLOPT_USERAGENT, 'PHPClassic/PHPShopify');
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 信任任何证书
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // 检查证书中是否设置域名
        $headers = [];
        foreach ($httpHeaders as $key => $value) {
            $headers[] = "$key: $value";