grab secret key from env
This commit is contained in:
parent
a1286417ea
commit
984dba9242
3
main.go
3
main.go
@ -6,6 +6,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ const MAX = 12
|
|||||||
var addr = flag.String("addr", ":8000", "address I'll listen on.")
|
var addr = flag.String("addr", ":8000", "address I'll listen on.")
|
||||||
var static_files = flag.String("static", "./static", "location of static files")
|
var static_files = flag.String("static", "./static", "location of static files")
|
||||||
|
|
||||||
var store = sessions.NewCookieStore([]byte("hello world"))
|
var store = sessions.NewCookieStore([]byte(os.Getenv("MMG_SECRET_KEY")))
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
rand.Seed(time.Now().UTC().UnixNano())
|
rand.Seed(time.Now().UTC().UnixNano())
|
||||||
|
Loading…
Reference in New Issue
Block a user