diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ca2a65e..8630a87 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "podcast", + "ImportPath": "github.com/gmemstr/pogo", "GoVersion": "go1.8", "GodepVersion": "v79", "Deps": [ diff --git a/README.md b/README.md index 9c7bbd7..2a0b851 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ To produce a product that is easy to deploy and easier to use when hosting a pod ``` godep restore go build +# Set enviornment variable +export POGO_SECRET=secret +# Windows +# set POGO_SECRET=secret ./podcast ``` diff --git a/auth/auth.go b/auth/auth.go index 30fe5d4..57dd304 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -14,6 +14,7 @@ import ( "log" "net/http" "strings" + "os" "github.com/gmemstr/pogo/common" ) @@ -22,7 +23,7 @@ const ( enc = "cookie_session_encryption" // This is the key with which each cookie is encrypted, I'll recommend moving it to a env file. - secret = "super_long_string_difficult_to" + secret = os.Getenv("POGO_SECRET") cookieName = "POGO_SESSION" cookieExpiry = 60 * 60 * 24 * 30 // 30 days in seconds )