fix: need to set api path
This commit is contained in:
parent
8f138a5df7
commit
6d8beb0331
|
@ -25,6 +25,7 @@ import (
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"io"
|
"io"
|
||||||
"lukechampine.com/blake3"
|
"lukechampine.com/blake3"
|
||||||
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -153,6 +154,16 @@ func (s *StorageServiceImpl) Init() error {
|
||||||
addr := s.portal.Config().GetString("core.sia.url")
|
addr := s.portal.Config().GetString("core.sia.url")
|
||||||
passwd := s.portal.Config().GetString("core.sia.key")
|
passwd := s.portal.Config().GetString("core.sia.key")
|
||||||
|
|
||||||
|
addrURL, err := url.Parse(addr)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
addrURL.Path = "/api"
|
||||||
|
|
||||||
|
addr = addrURL.String()
|
||||||
|
|
||||||
s.workerClient = workerClient.New(addr, passwd)
|
s.workerClient = workerClient.New(addr, passwd)
|
||||||
s.busClient = busClient.New(addr, passwd)
|
s.busClient = busClient.New(addr, passwd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue