fix static assets

This commit is contained in:
skyxingcheng233 2023-11-30 00:56:41 +08:00
parent 97d3cf1a3b
commit 9ea4485d46

View File

@ -46,9 +46,7 @@ type Server struct {
} }
func NewServer(cfg v1.WebServerConfig) (*Server, error) { func NewServer(cfg v1.WebServerConfig) (*Server, error) {
if cfg.AssetsDir != "" { assets.Load(cfg.AssetsDir)
assets.Load(cfg.AssetsDir)
}
addr := net.JoinHostPort(cfg.Addr, strconv.Itoa(cfg.Port)) addr := net.JoinHostPort(cfg.Addr, strconv.Itoa(cfg.Port))
if addr == ":" { if addr == ":" {