mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
add VERFIYPEER option to main api-request
This commit is contained in:
parent
319828033d
commit
ce46bfc03d
1 changed files with 3 additions and 0 deletions
|
@ -41,6 +41,9 @@ function api_request($path, $opts = null, $type = null) {
|
||||||
} else {
|
} else {
|
||||||
curl_setopt($ch, CURLOPT_USERPWD, "$apiuser:$apipass");
|
curl_setopt($ch, CURLOPT_USERPWD, "$apiuser:$apipass");
|
||||||
}
|
}
|
||||||
|
if ( strcasecmp( $apiproto, 'https' ) == 0 ) {
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $apisslverify);
|
||||||
|
}
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
if ($opts) {
|
if ($opts) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue