summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dain <ancarda@users.noreply.github.com>2014-01-04 20:40:48 +0400
committerMark Dain <ancarda@users.noreply.github.com>2014-01-04 20:40:48 +0400
commita8459038dc6d89fc6afb0e382f6ae0cf4f7d4f13 (patch)
tree7d9588f333191ccbd3b49f579335e694ffeb99a3
parentc9bf01c18818f7738e6b2670f1fd92f710ecb734 (diff)
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.
-rw-r--r--doc.go6
1 files 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