Don't re-generate token on every startup for now.

pull/2/head
Kevan Ahlquist 2016-04-01 11:10:30 -05:00
parent 15d133324d
commit 7267516363
1 changed files with 1 additions and 2 deletions

View File

@ -11,7 +11,6 @@ import (
"os"
"strings"
"github.com/gorilla/csrf"
"github.com/gorilla/securecookie"
)
var (
@ -19,7 +18,7 @@ var (
addr = flag.String("p", ":9000", "Address and port to serve dockerui")
assets = flag.String("a", ".", "Path to the assets")
CSRF = csrf.Protect(
[]byte(securecookie.GenerateRandomKey(32)),
[]byte("32-byte-long-auth-key"), // FIXME: generate once, reuse on restarts
csrf.HttpOnly(false),
csrf.Secure(false),
)