-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use maintained gziphandler #27894
Use maintained gziphandler #27894
Conversation
- https://github.com/NYTimes/gziphandler doesn't seems to be maintained anymore and Forgejo already includes https://github.com/klauspost/compress which provides a maintained and faster gzip handler fork. - Enables Jitter to prevent BREACH attacks, as this *seems* to be possible in the context of Forgejo. (cherry picked from commit 45a16f8c3c6f7d5e4aab8fdde6a621cf36e4801c)
"github.com/prometheus/client_golang/prometheus" | ||
) | ||
|
||
const ( | ||
// GzipMinSize represents min size to compress for the body size of response | ||
GzipMinSize = 1400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about GzipMinSize = gzhttp.DefaultMinSize
?
The library's License looks like some complicated. |
It looks like the |
The removed license should be equal to the added one because the new code is a fork of the replaced code. |
Replace #27894 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Replace go-gitea#27894 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Replace go-gitea#27894 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
https://github.com/klauspost/compress which provides a maintained and faster gzip handler fork.
(cherry picked from commit 45a16f8c3c6f7d5e4aab8fdde6a621cf36e4801c)