From a8459038dc6d89fc6afb0e382f6ae0cf4f7d4f13 Mon Sep 17 00:00:00 2001 From: Mark Dain Date: Sat, 4 Jan 2014 16:40:48 +0000 Subject: Fixed Formatting Issue Go will refuse to compile unless the last key is on the same line as the closing brace: `non-declaration statement outside function body`. Additionally, I set the HttpOnly flag on. I think this is a good default for everybody as it increases security and Gorilla's cookies are actually encrypted so JavaScript access is unlikely to be needed. --- doc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc.go') diff --git a/doc.go b/doc.go index 24ba077..f9f80cb 100644 --- a/doc.go +++ b/doc.go @@ -113,9 +113,9 @@ fields are basically a subset of http.Cookie fields. Let's change the maximum age of a session to one week: session.Options = &sessions.Options{ - Path: "/", - MaxAge: 86400 * 7, - } + Path: "/", + MaxAge: 86400 * 7, + HttpOnly: true} Sometimes we may want to change authentication and/or encryption keys without breaking existing sessions. The CookieStore supports key rotation, and to use -- cgit v1.2.3