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.
Этот коммит содержится в:
Jesse Hallam
2018-06-14 11:26:22 -04:00
коммит произвёл Christopher Speller
родитель d0cda0500e
Коммит f106417103
5 изменённых файлов: 286 добавлений и 2 удалений

Просмотреть файл

@@ -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))