Skip to content

Commit

Permalink
add local version to referer query
Browse files Browse the repository at this point in the history
  • Loading branch information
jim005 committed Nov 25, 2023
1 parent 49e2115 commit 8626727
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/class/netatmoPublicData.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public static function getNetatmoTokens()
log::add('netatmoPublicData', 'debug', 'Récupération nouveaux tokens - hostedApp');

$jeedom_id = crypt(jeedom::getApiKey('netatmoPublicData'), "OnExposePasCetteInfoInterne");
$npd_local_version = update::byLogicalId('netatmoPublicData')->getLocalVersion();

$client = new GuzzleHttp\Client();
$response = $client->request("GET", "https://gateway.websenso.net/flux/netatmo/getTokens.php", [
Expand All @@ -117,7 +118,7 @@ public static function getNetatmoTokens()
"jeedom_id" => $jeedom_id,
],
"headers" => [
"Referer" => "Jeedom " . $jeedom_id,
"Referer" => "Jeedom/" . $npd_local_version . " " . $jeedom_id,
],
]);

Expand Down

0 comments on commit 8626727

Please sign in to comment.