-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce custom compression decision function in handler (#96)
* feat: introduce custom compression decision function in handler - Add detailed comments explaining the `Handle` function in `handler.go` - Modify the condition in `Handle` to include a custom compression decision function - Consolidate exclusion checks in `shouldCompress` into a single condition - Add a new field `customShouldCompressFn` to the `config` struct in `options.go` - Introduce `WithCustomShouldCompressFn` option for setting a custom compression decision function Signed-off-by: appleboy <[email protected]> * test: improve test coverage and optimize API performance - Add a test for custom compression function in gzip middleware Signed-off-by: appleboy <[email protected]> --------- Signed-off-by: appleboy <[email protected]>
- Loading branch information
Showing
3 changed files
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters