diff --git a/config.dhall b/config.dhall index 35eac09..6b4c646 100644 --- a/config.dhall +++ b/config.dhall @@ -49,7 +49,8 @@ let Config = , AppName : Text , LiveMode : Bool , DevelMode : Bool - , LoginCookieName : Optional Text + , SessionCookieName : Text + , SessionCookieSecret : Text } let defconf @@ -61,7 +62,8 @@ let defconf , AppName = "pcmt" , LiveMode = False , DevelMode = False - , LoginCookieName = None Text + , SessionCookieName = "sessionz" + , SessionCookieSecret = "secret" } let conf @@ -88,4 +90,4 @@ let _ = -- | validate the configuration. assert : Config/validate conf -in nuconf +in conf diff --git a/config/config.go b/config/config.go index fc36093..4296e99 100644 --- a/config/config.go +++ b/config/config.go @@ -7,10 +7,12 @@ import ( ) type Config struct { - Port int - AppName string - LiveMode bool - DevelMode bool + Port int + AppName string + LiveMode bool + DevelMode bool + SessionCookieName string + SessionCookieSecret string } func LoadConfig(path string) (*Config, error) {