We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import brotli_enc "gopkg.in/kothar/brotli-go.v0/enc" compressor := middleware.NewCompressor(5, "text/html") compressor.SetEncoder("br", func(w http.ResponseWriter, level int) io.Writer { params := brotli_enc.NewBrotliParams() params.SetQuality(level) return brotli_enc.NewBrotliWriter(params, w) })
the above code shows error, but following seems working but compression not working what's wrong?
r := chi.NewRouter() //chi.NewMux() //r.Use(middleware.Logger) compressor := middleware.NewCompressor(5, "/*") //"/*" compressor.SetEncoder("br", func(w io.Writer, level int) io.Writer { params := brotli_enc.NewBrotliParams() params.SetQuality(level) return brotli_enc.NewBrotliWriter(params, w) }) r.Use(compressor.Handler) //
The text was updated successfully, but these errors were encountered:
No branches or pull requests
the above code shows error, but following seems working but compression not working what's wrong?
The text was updated successfully, but these errors were encountered: