tiny icon indicating copy to clipboard operation
tiny copied to clipboard

希望可以提供配置项

Open chaegumi opened this issue 2 years ago • 2 comments

category=elton-body-parser, message=request body is too large

是这个配置吗? e.Server.MaxHeaderBytes = 50 * 1024

我现在是直接运行 docker run -d --restart=always
-p 7001:7001
-p 7002:7002
--name=tiny
vicanso/tiny

chaegumi avatar Jul 18 '23 02:07 chaegumi

server/http.go 的body parser限制了最大为1MB,当前版本未支持配置,只能修改代码重新编译新版本 https://github.com/vicanso/tiny/blob/master/server/http.go#L258

vicanso avatar Jul 18 '23 22:07 vicanso

@chaegumi 最新版本已支持通过env设置,如TINY_BODY_PARSER_LIMIT=10MB

https://github.com/vicanso/tiny/blob/master/server/http.go#L260

如果只是为了压缩图片,可以尝试使用image-optim,性能更好

vicanso avatar Jul 19 '23 13:07 vicanso