From 6d8beb033145082218985388e02666fdf4f507da Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 25 Jan 2024 08:55:59 -0500 Subject: [PATCH] fix: need to set api path --- storage/storage.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/storage/storage.go b/storage/storage.go index 5c40d24..4874d8e 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -25,6 +25,7 @@ import ( "go.uber.org/zap" "io" "lukechampine.com/blake3" + "net/url" "strings" "time" ) @@ -153,6 +154,16 @@ func (s *StorageServiceImpl) Init() error { addr := s.portal.Config().GetString("core.sia.url") 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.busClient = busClient.New(addr, passwd)