From 86c52b645d2d9666c3fe0e2a3297f07abc3ce08e Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Mon, 20 Nov 2023 09:54:18 +0800 Subject: [PATCH] bind extension type static file --- server/handler/static_production.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/handler/static_production.go b/server/handler/static_production.go index db10431..f8316d9 100644 --- a/server/handler/static_production.go +++ b/server/handler/static_production.go @@ -6,6 +6,7 @@ package handler import ( "embed" "io/fs" + "mime" "net/http" "strings" @@ -25,6 +26,7 @@ func StaticRouter(router *gin.Engine) { return } + mime.AddExtensionType(".js", "application/javascript") static := router.Group("/plugin/topology") { static.StaticFS("/assets", http.FS(sf)) -- Gitee