mirror of https://github.com/gofiber/fiber.git
Fix goreportcard
parent
e94e1bc146
commit
cbfc9eb98c
|
@ -63,14 +63,14 @@ func (r *Fiber) Listen(address interface{}, tls ...string) {
|
|||
if r.Prefork && runtime.NumCPU() > 1 {
|
||||
if r.Banner && !r.child {
|
||||
cores := fmt.Sprintf("%s\x1b[1;30m %v cores", host, runtime.NumCPU())
|
||||
fmt.Printf(banner, Version, " prefork", "Express on steriods", cores)
|
||||
fmt.Printf(banner, Version, " prefork", "Express on steroids", cores)
|
||||
}
|
||||
r.prefork(server, host, tls...)
|
||||
}
|
||||
|
||||
// Prefork disabled
|
||||
if r.Banner {
|
||||
fmt.Printf(banner, Version, "", "Express on steriods", host)
|
||||
fmt.Printf(banner, Version, "", "Express on steroids", host)
|
||||
}
|
||||
|
||||
ln, err := net.Listen("tcp4", host)
|
||||
|
|
|
@ -86,16 +86,17 @@ func (ctx *Ctx) Cookie(key, value string, options ...interface{}) {
|
|||
cook.SetSecure(opt.Secure)
|
||||
}
|
||||
if opt.SameSite != "" {
|
||||
sameSite := fasthttp.CookieSameSiteDisabled
|
||||
sameSite := fasthttp.CookieSameSiteDefaultMode
|
||||
if strings.EqualFold(opt.SameSite, "lax") {
|
||||
sameSite = fasthttp.CookieSameSiteLaxMode
|
||||
} else if strings.EqualFold(opt.SameSite, "strict") {
|
||||
sameSite = fasthttp.CookieSameSiteStrictMode
|
||||
} else if strings.EqualFold(opt.SameSite, "none") {
|
||||
sameSite = fasthttp.CookieSameSiteNoneMode
|
||||
} else {
|
||||
sameSite = fasthttp.CookieSameSiteDefaultMode
|
||||
}
|
||||
// } else {
|
||||
// sameSite = fasthttp.CookieSameSiteDisabled
|
||||
// }
|
||||
cook.SetSameSite(sameSite)
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue