Skip to content

Commit

Permalink
Sign key path updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Zheng committed Sep 6, 2024
1 parent 962d4e7 commit 2bd7810
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cloud.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Cloud extends Base
const API_VER = 'ver_check';
const API_BETA_TEST = 'beta_test';
const API_REST_ECHO = 'tool/wp_rest_echo';
const API_SERVER_KEY = 'server_key';
const API_SERVER_KEY_SIGN = 'key_sign';

private static $CENTER_SVC_SET = array(
self::SVC_U_ACTIVATE,
Expand All @@ -63,10 +63,10 @@ class Cloud extends Base
self::SVC_D_DEL_CDN_DNS,
);

private static $WP_SVC_SET = array(self::API_NEWS, self::API_VER, self::API_BETA_TEST, self::API_REST_ECHO, self::API_SERVER_KEY);
private static $WP_SVC_SET = array(self::API_NEWS, self::API_VER, self::API_BETA_TEST, self::API_REST_ECHO);

// No api key needed for these services
private static $_PUB_SVC_SET = array(self::API_NEWS, self::API_REPORT, self::API_VER, self::API_BETA_TEST, self::API_REST_ECHO, self::API_SERVER_KEY);
private static $_PUB_SVC_SET = array(self::API_NEWS, self::API_REPORT, self::API_VER, self::API_BETA_TEST, self::API_REST_ECHO);

private static $_QUEUE_SVC_SET = array(self::SVC_UCSS, self::SVC_VPI);

Expand Down Expand Up @@ -233,9 +233,9 @@ private function _sign_b64($data)
private function _load_server_pk($from_wpapi = false)
{
// Load cloud pk
$server_key_url = self::CLOUD_SERVER . '/' . self::API_SERVER_KEY . '?type=sign';
$server_key_url = self::CLOUD_SERVER . '/' . self::API_SERVER_KEY_SIGN;
if ($from_wpapi) {
$server_key_url = self::CLOUD_SERVER_WP . '/' . self::API_SERVER_KEY . '?type=sign';
$server_key_url = self::CLOUD_SERVER_WP . '/' . self::API_SERVER_KEY_SIGN;
}
$resp = wp_remote_get($server_key_url);
if (is_wp_error($resp)) {
Expand Down

0 comments on commit 2bd7810

Please sign in to comment.