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.Prefork && runtime.NumCPU() > 1 {
|
||||||
if r.Banner && !r.child {
|
if r.Banner && !r.child {
|
||||||
cores := fmt.Sprintf("%s\x1b[1;30m %v cores", host, runtime.NumCPU())
|
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...)
|
r.prefork(server, host, tls...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prefork disabled
|
// Prefork disabled
|
||||||
if r.Banner {
|
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)
|
ln, err := net.Listen("tcp4", host)
|
||||||
|
|
|
@ -86,16 +86,17 @@ func (ctx *Ctx) Cookie(key, value string, options ...interface{}) {
|
||||||
cook.SetSecure(opt.Secure)
|
cook.SetSecure(opt.Secure)
|
||||||
}
|
}
|
||||||
if opt.SameSite != "" {
|
if opt.SameSite != "" {
|
||||||
sameSite := fasthttp.CookieSameSiteDisabled
|
sameSite := fasthttp.CookieSameSiteDefaultMode
|
||||||
if strings.EqualFold(opt.SameSite, "lax") {
|
if strings.EqualFold(opt.SameSite, "lax") {
|
||||||
sameSite = fasthttp.CookieSameSiteLaxMode
|
sameSite = fasthttp.CookieSameSiteLaxMode
|
||||||
} else if strings.EqualFold(opt.SameSite, "strict") {
|
} else if strings.EqualFold(opt.SameSite, "strict") {
|
||||||
sameSite = fasthttp.CookieSameSiteStrictMode
|
sameSite = fasthttp.CookieSameSiteStrictMode
|
||||||
} else if strings.EqualFold(opt.SameSite, "none") {
|
} else if strings.EqualFold(opt.SameSite, "none") {
|
||||||
sameSite = fasthttp.CookieSameSiteNoneMode
|
sameSite = fasthttp.CookieSameSiteNoneMode
|
||||||
} else {
|
|
||||||
sameSite = fasthttp.CookieSameSiteDefaultMode
|
|
||||||
}
|
}
|
||||||
|
// } else {
|
||||||
|
// sameSite = fasthttp.CookieSameSiteDisabled
|
||||||
|
// }
|
||||||
cook.SetSameSite(sameSite)
|
cook.SetSameSite(sameSite)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue