diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-06-14 11:26:22 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-06-14 08:26:22 -0700 |
commit | f106417103b036e8c349531f25487e526252d084 (patch) | |
tree | 6fe30dce0d91d04a54779b2183450cf1a90d8b66 /web/static.go | |
parent | d0cda0500eb4fa8818323a8680ac38a504aa9c15 (diff) | |
download | chat-f106417103b036e8c349531f25487e526252d084.tar.gz chat-f106417103b036e8c349531f25487e526252d084.tar.bz2 chat-f106417103b036e8c349531f25487e526252d084.zip |
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.
Diffstat (limited to 'web/static.go')
-rw-r--r-- | web/static.go | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |