添加静态文件路由支持 /assets/* 和 service worker 文件

This commit is contained in:
2026-04-22 20:10:22 +08:00
parent 13214913f6
commit afe8688bb7
+5
View File
@@ -54,6 +54,11 @@ func setupRoutes() *echo.Echo {
e.GET("/logo", api.Logo)
e.GET("/favicon.ico", handler)
e.GET("/static/*", handler)
e.GET("/assets/*", handler)
e.GET("/manifest.webmanifest", handler)
e.GET("/registerSW.js", handler)
e.GET("/sw.js", handler)
e.GET("/workbox-*.js", handler)
e.Use(middleware.Recover())
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{