Skip to content

Commit 6851ac6

Browse files
Add docs from gofiber/fiber@f4f2a36
1 parent a057d73 commit 6851ac6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/core/api/fiber.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ app := fiber.New(fiber.Config{
5858
| <Reference id="enableipvalidation">EnableIPValidation</Reference> | `bool` | If set to true, `c.IP()` and `c.IPs()` will validate IP addresses before returning them. Also, `c.IP()` will return only the first valid IP rather than just the raw header value that may be a comma separated string.<br /><br />**WARNING:** There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header. | `false` |
5959
| <Reference id="enablesplittingonparsers">EnableSplittingOnParsers</Reference> | `bool` | Splits query, body, and header parameters on commas when enabled.<br /><br />For example, `/api?foo=bar,baz` becomes `foo[]=bar&foo[]=baz`. | `false` |
6060
| <Reference id="trustproxy">TrustProxy</Reference> | `bool` | When true, Fiber validates the proxy IP against `TrustProxyConfig.Proxies`. <br /><br />By default, `c.Protocol()`, `c.IP()`, and `c.Hostname()` read values from standard X-Forwarded headers. If the remote IP matches a trusted proxy, these methods behave as if `TrustProxy` were disabled. Otherwise, `c.Protocol()` reflects the connection scheme, `c.IP()` uses `RemoteIP()` from Fasthttp, and `c.Hostname()` uses `fasthttp.Request.URI().Host()` | `false` |
61-
6261
| <Reference id="errorhandler">ErrorHandler</Reference> | `ErrorHandler` | ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests. | `DefaultErrorHandler` |
6362
| <Reference id="getonly">GETOnly</Reference> | `bool` | Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set. | `false` |
6463
| <Reference id="idletimeout">IdleTimeout</Reference> | `time.Duration` | The maximum amount of time to wait for the next request when keep-alive is enabled. If IdleTimeout is zero, the value of ReadTimeout is used. | `nil` |
@@ -131,10 +130,10 @@ func (app *App) Listen(addr string, config ...ListenConfig) error
131130
```
132131

133132
```go title="Examples"
134-
// Listen on port :8080
133+
// Listen on port :8080
135134
app.Listen(":8080")
136135

137-
// Listen on port :8080 with Prefork
136+
// Listen on port :8080 with Prefork
138137
app.Listen(":8080", fiber.ListenConfig{EnablePrefork: true})
139138

140139
// Custom host

0 commit comments

Comments
 (0)