Skip to content

Commit

Permalink
🧹 Maintenance: Fix merge conflict in documentation (#2957)
Browse files Browse the repository at this point in the history
Fix merge conflict
  • Loading branch information
gaby committed Apr 9, 2024
1 parent 8fc8ad9 commit bb41540
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions docs/api/middleware/earlydata.md
Expand Up @@ -50,38 +50,6 @@ app.Use(earlydata.New(earlydata.Config{

## Config

<<<<<<< HEAD:middleware/earlydata/README.md
```go
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c fiber.Ctx) bool

// IsEarlyData returns whether the request is an early-data request.
//
// Optional. Default: a function which checks if the "Early-Data" request header equals "1".
IsEarlyData func(c fiber.Ctx) bool

// AllowEarlyData returns whether the early-data request should be allowed or rejected.
//
// Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.
AllowEarlyData func(c fiber.Ctx) bool

// Error is returned in case an early-data request is rejected.
//
// Optional. Default: fiber.ErrTooEarly.
Error error
}
```

### Default Config

```go
var ConfigDefault = Config{
IsEarlyData: func(c fiber.Ctx) bool {
return c.Get("Early-Data") == "1"
=======
| Property | Type | Description | Default |
|:---------------|:------------------------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------|
| Next | `func(fiber.Ctx) bool` | Next defines a function to skip this middleware when returned true. | `nil` |
Expand All @@ -95,13 +63,10 @@ var ConfigDefault = Config{
var ConfigDefault = Config{
IsEarlyData: func(c fiber.Ctx) bool {
return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue
>>>>>>> origin/master:docs/api/middleware/earlydata.md
},
AllowEarlyData: func(c fiber.Ctx) bool {
return fiber.IsMethodSafe(c.Method())
},
Error: fiber.ErrTooEarly,
}
```
Expand Down

0 comments on commit bb41540

Please sign in to comment.