mirror of https://github.com/gofiber/fiber.git
ctx: make Secure() also report whether a secure connection was established to a trusted proxy (#2215)
We had a discussion about this in https://github.com/gofiber/helmet/pull/74.pull/2222/head
parent
a0645af1ed
commit
b288a9f54e
4
ctx.go
4
ctx.go
|
@ -1496,9 +1496,9 @@ func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, s
|
|||
return storage.Set(path, content, 0)
|
||||
}
|
||||
|
||||
// Secure returns a boolean property, that is true, if a TLS connection is established.
|
||||
// Secure returns whether a secure connection was established.
|
||||
func (c *Ctx) Secure() bool {
|
||||
return c.fasthttp.IsTLS()
|
||||
return c.Protocol() == "https"
|
||||
}
|
||||
|
||||
// Send sets the HTTP response body without copying it.
|
||||
|
|
Loading…
Reference in New Issue