1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-06 03:27:27 +00:00

update Blocks module

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-09-24 17:35:49 +03:00
parent e0ac28c1bb
commit e7b40398aa
16 changed files with 198 additions and 105 deletions

View File

@@ -336,18 +336,18 @@ func ConfigureMiddleware(handlers ...Handler) router.PartyConfigurator {
return &partyConfiguratorMiddleware{handlers: handlers}
}
var (
// Compression is a middleware which enables
// writing and reading using the best offered compression.
// Usage:
// app.Use (for matched routes)
// app.UseRouter (for both matched and 404s or other HTTP errors).
Compression = func(ctx Context) {
ctx.CompressWriter(true)
ctx.CompressReader(true)
ctx.Next()
}
// Compression is a middleware which enables
// writing and reading using the best offered compression.
// Usage:
// app.Use (for matched routes)
// app.UseRouter (for both matched and 404s or other HTTP errors).
func Compression(ctx Context) {
ctx.CompressWriter(true)
ctx.CompressReader(true)
ctx.Next()
}
var (
// AllowQuerySemicolons returns a middleware that serves requests by converting any
// unescaped semicolons(;) in the URL query to ampersands(&).
//