diff --git a/backend/init/router/router.go b/backend/init/router/router.go index 750ea65f6d0d..e1c4eae898dd 100644 --- a/backend/init/router/router.go +++ b/backend/init/router/router.go @@ -28,9 +28,9 @@ var ( ) func toIndexHtml(c *gin.Context) { + c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8") c.Writer.WriteHeader(http.StatusOK) _, _ = c.Writer.Write(web.IndexByte) - c.Writer.Header().Add("Accept", "text/html") c.Writer.Flush() } @@ -131,9 +131,9 @@ func setWebStatic(rootRouter *gin.RouterGroup) { handleNoRoute(c) return } + c.Writer.Header().Set("Content-Type", "text/html; charset=utf-8") c.Writer.WriteHeader(http.StatusOK) _, _ = c.Writer.Write(web.IndexByte) - c.Writer.Header().Add("Accept", "text/html") c.Writer.Flush() }) }