Solve the integration swagger into the gin framework, access the Chinese garbled problem in the json returned by swagger/doc.json.

This commit is contained in:
singhwang 2019-09-05 11:48:39 +08:00
parent d488a69274
commit 9c85c19254
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ func CustomWrapHandler(config *Config, h *webdav.Handler) gin.HandlerFunc {
} else if strings.HasSuffix(path, ".js") {
c.Header("Content-Type", "application/javascript")
} else if strings.HasSuffix(path, ".json") {
c.Header("Content-Type", "application/json")
c.Header("Content-Type", "application/json; charset=utf-8")
}
switch path {