apollo-client-python
apollo-client-python copied to clipboard
401错误
当config_url 为 https://dev.apollo.com/config-dev 时, get_value会报401.
给header增加加签需求
def _signHeaders(self, url):
headers = {}
if self.secret == '':
return headers
# 不合理处
uri = url[len(self.config_url):len(url)]
time_unix_now = str(int(round(time.time() * 1000)))
headers['Authorization'] = 'Apollo ' + self.app_id + ':' + signature(time_unix_now, uri, self.secret)
headers['Timestamp'] = time_unix_now
return headers
401 是不是权限不足