algorand / algorand/go-algorand-sdk

Conditional Client API token

オープン
#653 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
new-feature-request
主要言語
Go
スター
189
フォーク
107
平均マージ
1日 9時間
マージ済み PR(30日)
3

説明

## Problem
By default, Algorand public APIs require an algod_token to be consumed. However, it also allows the option to disable API authentication. When API auth is disabled, the request to the algod node can't be done since the algod token is always required by the client in go-algorand-sdk

## Solution
A potential solution could be to include a condition on [client.apiToken](https://github.com/algorand/go-algorand-sdk/blob/a55d63f27569304696d4e49971e3342e0b6bed21/client/v2/common/common.go#L157)
```
if len(client.apiToken) > 0 {
req.Header.Set(client.apiHeader, client.apiToken)
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。