summaryrefslogtreecommitdiffstats
path: root/app/app.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-11-03 17:47:52 -0400
committerGitHub <noreply@github.com>2017-11-03 17:47:52 -0400
commit2acb5486157691c5b52656f7b45e0a2ab18d1c68 (patch)
treece8f69cd639befb59922218282e158690d2fd2e2 /app/app.go
parent2dda86b25d8c4acf8cac354e34d446cc6603f406 (diff)
downloadchat-2acb5486157691c5b52656f7b45e0a2ab18d1c68.tar.gz
chat-2acb5486157691c5b52656f7b45e0a2ab18d1c68.tar.bz2
chat-2acb5486157691c5b52656f7b45e0a2ab18d1c68.zip
PLT-8086 Fix plugin config watcher for enabling and disabling (#7770)
* Fix plugin config watcher for enabling and disabling * Make sure HTTP routes are served * Set content-type explicitly
Diffstat (limited to 'app/app.go')
-rw-r--r--app/app.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/app.go b/app/app.go
index a8d2977b5..80dc5a8ab 100644
--- a/app/app.go
+++ b/app/app.go
@@ -93,6 +93,9 @@ func New(options ...Option) *App {
app.Srv.Store = app.newStore()
app.initJobs()
+ 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)
+
app.Srv.Router.NotFoundHandler = http.HandlerFunc(app.Handle404)
app.Srv.WebSocketRouter = &WebSocketRouter{