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(-) 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 From 6e8111651587e2cf4de2570a5d3676a2397f82ea Mon Sep 17 00:00:00 2001 From: Mark Dain Date: Sun, 5 Jan 2014 10:10:22 +0000 Subject: Added trailing comma --- doc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc.go b/doc.go index f9f80cb..c8eb758 100644 --- a/doc.go +++ b/doc.go @@ -115,7 +115,8 @@ maximum age of a session to one week: session.Options = &sessions.Options{ Path: "/", MaxAge: 86400 * 7, - HttpOnly: true} + 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