File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
website/content/middleware Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ +++
2
+ title = " Decompress Middleware"
3
+ description = " Decompress middleware for Echo"
4
+ [menu .main ]
5
+ name = " Decompress"
6
+ parent = " middleware"
7
+ +++
8
+
9
+ Decompress middleware decompresses HTTP request if Content-Encoding header is set to gzip.
10
+
11
+ * Usage*
12
+
13
+ ` e.Use(middleware.Decompress()) `
14
+
15
+ ## Custom Configuration
16
+
17
+ * Usage*
18
+
19
+ ``` go
20
+ e := echo.New ()
21
+ e.Use (middleware.DecompressWithConfig (middleware.DecompressConfig {
22
+ Skipper : Skipper
23
+ }))
24
+ ```
25
+
26
+ ## Configuration
27
+
28
+ ``` go
29
+ DecompressConfig struct {
30
+ // Skipper defines a function to skip middleware.
31
+ Skipper Skipper
32
+ }
33
+ ```
34
+
35
+ * Default Configuration*
36
+
37
+ ``` go
38
+ DefaultDecompressConfig = DecompressConfig {
39
+ Skipper : DefaultSkipper ,
40
+ }
41
+ ```
You can’t perform that action at this time.
0 commit comments