From f106417103b036e8c349531f25487e526252d084 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Thu, 14 Jun 2018 11:26:22 -0400 Subject: MM-10367: rewrite subpath assets on startup (#8944) Examine ServiceSettings.SiteURL on startup and rewrite assets accordingly if not in a development environment. Also export `mattermost config subpath` command to manually do same. This accompanies a webapp PR to use the updated `root.html` to define the necessary webpack asset path for dynamically loading assets. --- web/static.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web/static.go') diff --git a/web/static.go b/web/static.go index 487526fdf..1f76b2725 100644 --- a/web/static.go +++ b/web/static.go @@ -18,6 +18,8 @@ import ( func (w *Web) InitStatic() { if *w.App.Config().ServiceSettings.WebserverMode != "disabled" { + UpdateAssetsSubpathFromConfig(w.App.Config()) + staticDir, _ := utils.FindDir(model.CLIENT_DIR) mlog.Debug(fmt.Sprintf("Using client directory at %v", staticDir)) -- cgit v1.2.3-1-g7c22