mirror of https://github.com/gofiber/fiber.git
🦺 make copy of body
parent
70d7c53557
commit
5bc5f96324
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
@ -203,7 +204,7 @@ func New(config ...Config) fiber.Handler {
|
|||
}
|
||||
|
||||
// Cache response
|
||||
entryBody = c.Response().Body()
|
||||
entryBody = utils.SafeBytes(c.Response().Body())
|
||||
entry.status = c.Response().StatusCode()
|
||||
entry.cType = c.Response().Header.ContentType()
|
||||
|
||||
|
|
Loading…
Reference in New Issue