diff options
author | Mark Dain <ancarda@users.noreply.github.com> | 2014-01-04 20:40:48 +0400 |
---|---|---|
committer | Mark Dain <ancarda@users.noreply.github.com> | 2014-01-04 20:40:48 +0400 |
commit | a8459038dc6d89fc6afb0e382f6ae0cf4f7d4f13 (patch) | |
tree | 7d9588f333191ccbd3b49f579335e694ffeb99a3 | |
parent | c9bf01c18818f7738e6b2670f1fd92f710ecb734 (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.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |