Skip to content

Empty token is not handled in RPC client #4196

Closed
@eshaan7

Description

@eshaan7

This line doesn't properly handle the case of empty token that is useful if node is running with skip-auth flag enabled.

authHeader := http.Header{perms.AuthKey: []string{fmt.Sprintf("Bearer %s", token)}}

This should be handled similar to the logic in celestia-openrpc:

https://github.com/celestiaorg/celestia-openrpc/blob/089b92870cb65f8e190ad6d7215b645b942e43b6/client.go#L44-L47

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions