1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-21 03:27:01 +00:00

Session cookie key is now configurable

- Added [web] cookie.auth.key to configuration
- Inbucket generates a random key if none is configured
- Added [default] default.domain to be reference by SMTP and POP3
  configs
- Updated default/sample config files
This commit is contained in:
James Hillyerd
2016-02-27 15:43:44 -08:00
parent 5e15300d02
commit bbfdd4216f
8 changed files with 78 additions and 25 deletions

View File

@@ -39,6 +39,7 @@ type WebConfig struct {
TemplateCache bool
PublicDir string
GreetingFile string
CookieAuthKey string
}
// DataStoreConfig contains the mail store configuration
@@ -348,6 +349,15 @@ func parseWebConfig() error {
}
webConfig.GreetingFile = str
option = "cookie.auth.key"
if Config.HasOption(section, option) {
str, err = Config.String(section, option)
if err != nil {
return fmt.Errorf("Failed to parse [%v]%v: '%v'", section, option, err)
}
webConfig.CookieAuthKey = str
}
return nil
}