Skip to content

Commit

Permalink
Merge pull request #7 from mazahakq/patch-1
Browse files Browse the repository at this point in the history
issue 5 proxy use
  • Loading branch information
skysilver-lab authored Sep 20, 2023
2 parents 16a4d10 + b0847e0 commit 8b12515
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/yandexhome/yandexhome.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,13 @@ function PropertySetHandle($object, $property, $value)
$headr[] = 'Content-type: application/json';
$headr[] = 'Authorization: OAuth '.$this->config['SKILL_ACCESS_TOKEN'];

if (defined('USE_PROXY') && USE_PROXY != '') {
curl_setopt($crl, CURLOPT_PROXY, USE_PROXY);
if (defined('USE_PROXY_AUTH') && USE_PROXY_AUTH != '') {
curl_setopt($crl, CURLOPT_PROXYUSERPWD, USE_PROXY_AUTH);
}
}

curl_setopt($crl, CURLOPT_HTTPHEADER,$headr);
curl_setopt($crl, CURLOPT_POST, 1);
curl_setopt($crl, CURLOPT_POSTFIELDS, json_encode($send));
Expand Down

0 comments on commit 8b12515

Please sign in to comment.