This commit is contained in:
WJQSERVER 2024-10-24 01:46:03 +08:00
parent a8af0fb687
commit 3489e6d744
4 changed files with 16 additions and 3 deletions

View file

@ -45,7 +45,7 @@ func InitHandleRouter(cfg *config.Config, router *gin.Engine) {
}
func SizeLimitHandler(cfg *config.Config, c *gin.Context) {
sizeLimit := cfg.Server.SizeLimit / 1024 / 1024
sizeLimit := cfg.Server.SizeLimit
c.Writer.Header().Set("Content-Type", "application/json")
json.NewEncoder(c.Writer).Encode(map[string]interface{}{
"MaxResponseBodySize": sizeLimit,