Allow BaseURL to contain full server url, including scheme and host. Fix #2183

This commit is contained in:
Deluan
2023-02-15 21:13:38 -05:00
parent aac6e2cb07
commit 10108c63c9
8 changed files with 102 additions and 17 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ type Router struct {
func New(ds model.DataStore, artwork artwork.Artwork, streamer core.MediaStreamer, share core.Share) *Router {
p := &Router{ds: ds, artwork: artwork, streamer: streamer, share: share}
shareRoot := path.Join(conf.Server.BaseURL, consts.URLPathPublic)
shareRoot := path.Join(conf.Server.BasePath, consts.URLPathPublic)
p.assetsHandler = http.StripPrefix(shareRoot, http.FileServer(http.FS(ui.BuildAssets())))
p.Handler = p.routes()