Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

modify Addresses.Gateway/API to array #6

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ type Addresses struct {
Swarm []string // addresses for the swarm to listen on
Announce []string // swarm addresses to announce to the network
NoAnnounce []string // swarm addresses not to announce to the network
API string // address for the local API (RPC)
Gateway string // address to listen on for IPFS HTTP object gateway
API []string // address for the local API (RPC)
Gateway []string // address to listen on for IPFS HTTP object gateway
}
4 changes: 2 additions & 2 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func addressesConfig() Addresses {
},
Announce: []string{},
NoAnnounce: []string{},
API: "/ip4/127.0.0.1/tcp/5001",
Gateway: "/ip4/127.0.0.1/tcp/8080",
API: []string{"/ip4/127.0.0.1/tcp/5001"},
Gateway: []string{"/ip4/127.0.0.1/tcp/8080"},
}
}

Expand Down
4 changes: 2 additions & 2 deletions profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ profile, enables discovery in local networks.`,
is useful when using the daemon in test environments.`,

Transform: func(c *Config) error {
c.Addresses.API = "/ip4/127.0.0.1/tcp/0"
c.Addresses.Gateway = "/ip4/127.0.0.1/tcp/0"
c.Addresses.API = []string{"/ip4/127.0.0.1/tcp/0"}
c.Addresses.Gateway = []string{"/ip4/127.0.0.1/tcp/0"}
c.Addresses.Swarm = []string{
"/ip4/127.0.0.1/tcp/0",
}
Expand Down