Fix image signed URLs ignoring updated public base URL.
CI / docker (push) Failing after 10s

Resolve public_base_url at SignURL time so admin settings apply without restart.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
renjue
2026-06-24 14:34:22 +08:00
parent e761074fb9
commit 2665ac1dee
4 changed files with 45 additions and 15 deletions
+4 -5
View File
@@ -24,20 +24,19 @@ type Service struct {
db *gorm.DB
cache *cache.Store
images *imagestore.Store
hub *Hub
publicURL string
waitSec int64
hub *Hub
waitSec int64
mu sync.Mutex
running map[string]context.CancelFunc
}
func NewService(db *gorm.DB, c *cache.Store, images *imagestore.Store, publicURL string, waitSec int64) *Service {
func NewService(db *gorm.DB, c *cache.Store, images *imagestore.Store, waitSec int64) *Service {
if waitSec <= 0 {
waitSec = 60
}
return &Service{
db: db, cache: c, images: images, hub: NewHub(),
publicURL: strings.TrimRight(publicURL, "/"), waitSec: waitSec,
waitSec: waitSec,
running: make(map[string]context.CancelFunc),
}
}