Remove explicit application/wasm mimetype (#13804)
Go mime sniffer supports the application/wasm mimetype natively now. So there is no need to set this explicitly.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
720de2bec3
Коммит
a986aeb401
@@ -4,7 +4,6 @@
|
|||||||
package web
|
package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mime"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -31,8 +30,6 @@ func (w *Web) InitStatic() {
|
|||||||
|
|
||||||
subpath, _ := utils.GetSubpathFromConfig(w.ConfigService.Config())
|
subpath, _ := utils.GetSubpathFromConfig(w.ConfigService.Config())
|
||||||
|
|
||||||
mime.AddExtensionType(".wasm", "application/wasm")
|
|
||||||
|
|
||||||
staticHandler := staticFilesHandler(http.StripPrefix(path.Join(subpath, "static"), http.FileServer(http.Dir(staticDir))))
|
staticHandler := staticFilesHandler(http.StripPrefix(path.Join(subpath, "static"), http.FileServer(http.Dir(staticDir))))
|
||||||
pluginHandler := staticFilesHandler(http.StripPrefix(path.Join(subpath, "static", "plugins"), http.FileServer(http.Dir(*w.ConfigService.Config().PluginSettings.ClientDirectory))))
|
pluginHandler := staticFilesHandler(http.StripPrefix(path.Join(subpath, "static", "plugins"), http.FileServer(http.Dir(*w.ConfigService.Config().PluginSettings.ClientDirectory))))
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user