@@ -26,7 +26,7 @@ import (
26
26
)
27
27
28
28
// Version of current package
29
- const Version = "1.10.3 "
29
+ const Version = "1.10.4 "
30
30
31
31
// Map is a shortcut for map[string]interface{}, useful for JSON returns
32
32
type Map map [string ]interface {}
@@ -49,8 +49,9 @@ type App struct {
49
49
50
50
// Settings holds is a struct holding the server settings
51
51
type Settings struct {
52
- // This will spawn multiple Go processes listening on the same port
53
- Prefork bool // default: false
52
+ // Enables the "Server: value" HTTP header.
53
+ // Default: ""
54
+ ServerHeader string
54
55
55
56
// Enable strict routing. When enabled, the router treats "/foo" and "/foo/" as different.
56
57
// By default this is disabled and both "/foo" and "/foo/" will execute the same handler.
@@ -60,49 +61,62 @@ type Settings struct {
60
61
// By default this is disabled and both "/FoO" and "/foo" will execute the same handler.
61
62
CaseSensitive bool
62
63
63
- // Enables the "Server: value" HTTP header.
64
- ServerHeader string // default: ""
65
-
66
64
// Enables handler values to be immutable even if you return from handler
67
- Immutable bool // default: false
65
+ // Default: false
66
+ Immutable bool
68
67
69
68
// Enable or disable ETag header generation, since both weak and strong etags are generated
70
69
// using the same hashing method (CRC-32). Weak ETags are the default when enabled.
71
- // Optional. Default value false
70
+ // Default value false
72
71
ETag bool
73
72
73
+ // This will spawn multiple Go processes listening on the same port
74
+ // Default: false
75
+ Prefork bool
76
+
74
77
// Max body size that the server accepts
75
- BodyLimit int // default: 4 * 1024 * 1024
78
+ // Default: 4 * 1024 * 1024
79
+ BodyLimit int
76
80
77
81
// Maximum number of concurrent connections.
78
- Concurrency int // default: 256 * 1024
82
+ // Default: 256 * 1024
83
+ Concurrency int
79
84
80
85
// Disable keep-alive connections, the server will close incoming connections after sending the first response to client
81
- DisableKeepalive bool // default: false
86
+ // Default: false
87
+ DisableKeepalive bool
82
88
83
89
// When set to true causes the default date header to be excluded from the response.
84
- DisableDefaultDate bool // default: false
90
+ // Default: false
91
+ DisableDefaultDate bool
85
92
86
93
// When set to true, causes the default Content-Type header to be excluded from the Response.
87
- DisableDefaultContentType bool // default: false
94
+ // Default: false
95
+ DisableDefaultContentType bool
88
96
89
97
// By default all header names are normalized: conteNT-tYPE -> Content-Type
90
- DisableHeaderNormalizing bool // default: false
98
+ // Default: false
99
+ DisableHeaderNormalizing bool
91
100
92
101
// When set to true, it will not print out the «Fiber» ASCII art and listening address
93
- DisableStartupMessage bool // default: false
102
+ // Default: false
103
+ DisableStartupMessage bool
94
104
95
105
// Templates is the interface that wraps the Render function.
106
+ // Default: nil
96
107
Templates Templates
97
108
98
109
// The amount of time allowed to read the full request including body.
99
- ReadTimeout time.Duration // default: unlimited
110
+ // Default: unlimited
111
+ ReadTimeout time.Duration
100
112
101
113
// The maximum duration before timing out writes of the response.
102
- WriteTimeout time.Duration // default: unlimited
114
+ // Default: unlimited
115
+ WriteTimeout time.Duration
103
116
104
117
// The maximum amount of time to wait for the next request when keep-alive is enabled.
105
- IdleTimeout time.Duration // default: unlimited
118
+ // Default: unlimited
119
+ IdleTimeout time.Duration
106
120
107
121
// TODO: v1.11
108
122
// The router executes the same handler by default if StrictRouting or CaseSensitive is disabled.
0 commit comments