From e8f3766981f70d98d8a997a1638dcedf542808a4 Mon Sep 17 00:00:00 2001 From: engigu Date: Wed, 11 Mar 2026 11:46:40 +0800 Subject: [PATCH] chore: add vs dist server for monaco --- internal/router/static_routes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/router/static_routes.go b/internal/router/static_routes.go index b3c0c1c..ecb005f 100644 --- a/internal/router/static_routes.go +++ b/internal/router/static_routes.go @@ -37,6 +37,11 @@ func initStaticRoutes(root *gin.RouterGroup) { assetsGroup.Use(cacheControl("public, max-age=31536000, immutable")) // 带哈希的资源缓存 assetsGroup.StaticFS("/", http.FS(mustSubFS(staticFS, "assets"))) + // Monaco Editor (vs) 静态资源 + vsGroup := root.Group("/vs") + vsGroup.Use(cacheControl("public, max-age=31536000, immutable")) + vsGroup.StaticFS("/", http.FS(mustSubFS(staticFS, "vs"))) + // logo.svg 短缓存实现 root.GET("/logo.svg", func(ctx *gin.Context) { data, err := static.ReadFile("logo.svg")