summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sessions.go3
1 files changed, 3 insertions, 0 deletions
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...)
}