We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f48673 commit 3032150Copy full SHA for 3032150
api/rpc/client/client.go
@@ -66,7 +66,10 @@ func (c *Client) Close() {
66
// NewClient creates a new Client with one connection per namespace with the
67
// given token as the authorization token.
68
func NewClient(ctx context.Context, addr, token string) (*Client, error) {
69
- authHeader := http.Header{perms.AuthKey: []string{fmt.Sprintf("Bearer %s", token)}}
+ var authHeader http.Header
70
+ if token != "" {
71
+ authHeader = http.Header{perms.AuthKey: []string{fmt.Sprintf("Bearer %s", token)}}
72
+ }
73
return newClient(ctx, addr, authHeader)
74
}
75
0 commit comments