Fix goreportcard

pull/15/head
Fenny 2020-02-03 14:27:35 +01:00
parent e94e1bc146
commit cbfc9eb98c
2 changed files with 6 additions and 5 deletions

View File

@ -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)

View File

@ -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: