fix builtin plugin http router (#7797)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
fef70d6c9e
Коммит
61db2ff59b
@@ -93,6 +93,7 @@ func New(options ...Option) *App {
|
||||
app.Srv.Store = app.newStore()
|
||||
app.initJobs()
|
||||
|
||||
app.initBuiltInPlugins()
|
||||
app.Srv.Router.HandleFunc("/plugins/{plugin_id:[A-Za-z0-9\\_\\-\\.]+}", app.ServePluginRequest)
|
||||
app.Srv.Router.HandleFunc("/plugins/{plugin_id:[A-Za-z0-9\\_\\-\\.]+}/{anything:.*}", app.ServePluginRequest)
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ func (api *BuiltInPluginAPI) I18n(id string, r *http.Request) string {
|
||||
return f(id)
|
||||
}
|
||||
|
||||
func (a *App) InitBuiltInPlugins() {
|
||||
func (a *App) initBuiltInPlugins() {
|
||||
plugins := map[string]builtinplugin.Plugin{
|
||||
"jira": &jira.Plugin{},
|
||||
"ldapextras": &ldapextras.Plugin{},
|
||||
|
||||
@@ -71,8 +71,6 @@ func runServer(configFileLocation string) {
|
||||
a.LoadLicense()
|
||||
}
|
||||
|
||||
a.InitBuiltInPlugins()
|
||||
|
||||
if webappDir, ok := utils.FindDir(model.CLIENT_DIR); ok {
|
||||
a.InitPlugins(*a.Config().PluginSettings.Directory, webappDir+"/plugins")
|
||||
utils.AddConfigListener(func(prevCfg, cfg *model.Config) {
|
||||
|
||||
Ссылка в новой задаче
Block a user