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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user