From bb41540a720afc03d0dd5921611ec006c11cf79b Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:06:50 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Maintenance:=20Fix=20merge=20con?= =?UTF-8?q?flict=20in=20documentation=20(#2957)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix merge conflict --- docs/api/middleware/earlydata.md | 35 -------------------------------- 1 file changed, 35 deletions(-) diff --git a/docs/api/middleware/earlydata.md b/docs/api/middleware/earlydata.md index 74a4137513..a5ce3219fc 100644 --- a/docs/api/middleware/earlydata.md +++ b/docs/api/middleware/earlydata.md @@ -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` | @@ -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, } ```