This commit is contained in:
shaoyongjun 2024-04-30 00:08:26 +08:00
parent e97a1c3237
commit d75aced248

View File

@ -17,12 +17,12 @@ func InitStaticGroup(g *echo.Group) {
g.GET("css/login.css", func(c echo.Context) error { g.GET("css/login.css", func(c echo.Context) error {
c.Response().Header().Set("Cache-Control", "max-age=3600") c.Response().Header().Set("Cache-Control", "max-age=3600")
data, _ := cssMap["login.css"] data, _ := cssMap["login.css"]
return c.Blob(http.StatusOK, "text/html; charset=utf-8", data) return c.Blob(http.StatusOK, "text/css; charset=utf-8", data)
}) })
g.GET("img/003.jpeg", func(c echo.Context) error { g.GET("img/003.jpeg", func(c echo.Context) error {
c.Response().Header().Set("Cache-Control", "max-age=3600") c.Response().Header().Set("Cache-Control", "max-age=3600")
return c.Blob(http.StatusOK, "text/html; charset=utf-8", imgMap()["003.jpeg"]) return c.Blob(http.StatusOK, "image/jpeg", imgMap()["003.jpeg"])
}) })
g.GET("/aa", func(c echo.Context) error { g.GET("/aa", func(c echo.Context) error {