Fix plugins serving after subpath changes (#8982)
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
454522cc30
Коммит
1c194e5fbd
@@ -27,7 +27,7 @@ func (w *Web) InitStatic() {
|
|||||||
subpath, _ := utils.GetSubpathFromConfig(w.App.Config())
|
subpath, _ := utils.GetSubpathFromConfig(w.App.Config())
|
||||||
|
|
||||||
staticHandler := staticHandler(http.StripPrefix(path.Join(subpath, "static"), http.FileServer(http.Dir(staticDir))))
|
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" {
|
if *w.App.Config().ServiceSettings.WebserverMode == "gzip" {
|
||||||
staticHandler = gziphandler.GzipHandler(staticHandler)
|
staticHandler = gziphandler.GzipHandler(staticHandler)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user