From d79c2978805a370616c60f0f1d1284bcddc2fa97 Mon Sep 17 00:00:00 2001 From: slene Date: Mon, 17 Mar 2014 12:27:04 +0800 Subject: [PATCH] rollback: set httponly default is false. --- context/output.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/context/output.go b/context/output.go index a8a304b6..2d7814e4 100644 --- a/context/output.go +++ b/context/output.go @@ -135,12 +135,12 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface } } - // default true - httponly := true + // default false. for session cookie default true + httponly := false if len(others) > 4 { - if v, ok := others[4].(bool); ok && !v || others[4] == nil { - // HttpOnly = false - httponly = false + if v, ok := others[4].(bool); ok && v { + // HttpOnly = true + httponly = true } }