From 82dfe9e61df90c9eb6c6540ca6d82b328661b652 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 31 Jul 2018 07:44:44 -0700 Subject: Adding support for code split plugins. (#9184) --- web/static.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'web') diff --git a/web/static.go b/web/static.go index 4c27d6325..7c1d37252 100644 --- a/web/static.go +++ b/web/static.go @@ -5,6 +5,7 @@ package web import ( "fmt" + "mime" "net/http" "path" "path/filepath" @@ -26,6 +27,8 @@ func (w *Web) InitStatic() { subpath, _ := utils.GetSubpathFromConfig(w.App.Config()) + mime.AddExtensionType(".wasm", "application/wasm") + staticHandler := staticHandler(http.StripPrefix(path.Join(subpath, "static"), http.FileServer(http.Dir(staticDir)))) pluginHandler := pluginHandler(w.App.Config, http.StripPrefix(path.Join(subpath, "static", "plugins"), http.FileServer(http.Dir(*w.App.Config().PluginSettings.ClientDirectory)))) -- cgit v1.2.3-1-g7c22