Skip to content
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

gzip decompress-only supports #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yzqzss
Copy link

@yzqzss yzqzss commented Oct 14, 2024

Hi, my backend service runs behind Caddy (which has gzip and zstd compression enabled).

So I want to use gin-contrib/gzip to decompress incoming gzip requests but not touch the responses.

How to use

use gzip.WithDecompressOnly(true) option.

r.Use(gzip.Gzip(gzip.NoCompression, gzip.WithDecompressOnly(true), gzip.WithDecompressFn(gzip.DefaultDecompressHandle)))

related: #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant