Fix plugins serving after subpath changes (#8982)

This commit is contained in:
Joram Wilander
2018-06-22 22:09:31 -04:00
committed by Jesse Hallam
parent 454522cc30
commit 1c194e5fbd
+1 -1
View File
@@ -27,7 +27,7 @@ func (w *Web) InitStatic() {
subpath, _ := utils.GetSubpathFromConfig(w.App.Config())
staticHandler := staticHandler(http.StripPrefix(path.Join(subpath, "static"), http.FileServer(http.Dir(staticDir))))
pluginHandler := pluginHandler(w.App.Config, http.StripPrefix(path.Join(subpath, "plugins"), http.FileServer(http.Dir(*w.App.Config().PluginSettings.ClientDirectory))))
pluginHandler := pluginHandler(w.App.Config, http.StripPrefix(path.Join(subpath, "static", "plugins"), http.FileServer(http.Dir(*w.App.Config().PluginSettings.ClientDirectory))))
if *w.App.Config().ServiceSettings.WebserverMode == "gzip" {
staticHandler = gziphandler.GzipHandler(staticHandler)