Skip to content

Commit

Permalink
docs: ipfs daemon informs about API.Authorizations
Browse files Browse the repository at this point in the history
User should be informed when access is limited.
  • Loading branch information
lidel committed Nov 15, 2023
1 parent 7b97003 commit 25e8d3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
listeners = append(listeners, apiLis)
}

if len(cfg.API.Authorizations) > 0 && len(listeners) > 0 {
fmt.Printf("RPC API access is limited by the rules defined in API.Authorizations\n")
}

Check warning on line 681 in cmd/ipfs/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/daemon.go#L679-L681

Added lines #L679 - L681 were not covered by tests

for _, listener := range listeners {
// we might have listened to /tcp/0 - let's see what we are listing on
fmt.Printf("RPC API server listening on %s\n", listener.Multiaddr())
Expand Down

0 comments on commit 25e8d3d

Please sign in to comment.