From 61ae93e6ea22407566ba751bae9ef079f89aa646 Mon Sep 17 00:00:00 2001 From: Hank Shen Date: Mon, 15 Jun 2020 16:11:28 +0800 Subject: update --- sessions.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sessions.go b/sessions.go index dc65b9e..2f20258 100644 --- a/sessions.go +++ b/sessions.go @@ -195,6 +195,9 @@ func NewCookie(ctx echo.Context, name, value string) *http.Cookie { // SetCookie for echo // @param:ctx,key,value,maxAge(seconds),path(/),domain,secure,httpOnly,sameSite(lax/strict/default) func SetCookie(ctx echo.Context, key string, value string, args ...interface{}) { + if len(args) == 0 { + args = append(args, ctx.CookieOptions()) + } ctx.SetCookie(key, value, args...) } -- cgit v1.2.3