diff options
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index 4d3c70b..5997141 100644 --- a/it_url.class +++ b/it_url.class @@ -414,8 +414,13 @@ static function curl_opts($p=array()) CURLOPT_LOW_SPEED_TIME => $p['timeout'], CURLOPT_FOLLOWLOCATION => false, CURLOPT_HTTPHEADER => $headers, - CURLOPT_SSL_VERIFYPEER => 0, - CURLOPT_SSL_VERIFYHOST => 0, + + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYHOST => 2, + CURLOPT_CAPATH => '/etc/ssl/certs/', + CURLOPT_SSL_VERIFYPEER => 1, + CURLOPT_SSL_VERIFYHOST => 2, + CURLINFO_HEADER_OUT => 1, ]; } @@ -435,6 +440,7 @@ function request_curl($p=array()) if ($p['url']) $this->it_url($p['url']); + $url->headers = []; $p['headers'] = (array)$p['headers'] + array( 'Host' => $url->realhostname . $url->explicitport, |