Update config and example config
This commit is contained in:
parent
bb12231ff8
commit
757b37ecf4
2 changed files with 93 additions and 79 deletions
|
@ -31,12 +31,12 @@ type ConfigGeneral struct {
|
|||
PublicPort *int `toml:"public_port"`
|
||||
// File to write structured logs to (structured being formatted as json)
|
||||
// If not set, Linstrom won't write structured logs
|
||||
StructuredLogFile *string
|
||||
StructuredLogFile *string `toml:"structured_log_file"`
|
||||
}
|
||||
|
||||
type ConfigWebAuthn struct {
|
||||
DisplayName string `toml:"display_name"`
|
||||
HashingSecret string `toml:"hashing_secret"`
|
||||
DisplayName string `toml:"display_name"`
|
||||
// HashingSecret string `toml:"hashing_secret"`
|
||||
}
|
||||
|
||||
type ConfigAdmin struct {
|
||||
|
@ -60,9 +60,9 @@ type ConfigStorage struct {
|
|||
// The maximum size of the in-memory cache in bytes
|
||||
MaxInMemoryCacheSize int64 `toml:"max_in_memory_cache_size"`
|
||||
// The time to live for in app in memory cache items, in seconds
|
||||
MaxInMemoryCacheTTL int
|
||||
MaxInMemoryCacheTTL int `toml:"max_in_memory_cache_ttl"`
|
||||
// The time to live for items in redis, in seconds
|
||||
MaxRedisCacheTTL *int
|
||||
MaxRedisCacheTTL *int `toml:"max_redis_cache_ttl"`
|
||||
}
|
||||
|
||||
type ConfigMail struct {
|
||||
|
@ -90,11 +90,12 @@ var GlobalConfig Config
|
|||
|
||||
var defaultConfig Config = Config{
|
||||
General: ConfigGeneral{
|
||||
Protocol: "http",
|
||||
Subdomain: nil,
|
||||
Domain: "localhost",
|
||||
PrivatePort: 8080,
|
||||
PublicPort: nil,
|
||||
Protocol: "http",
|
||||
Subdomain: nil,
|
||||
Domain: "localhost",
|
||||
PrivatePort: 8080,
|
||||
PublicPort: nil,
|
||||
StructuredLogFile: nil,
|
||||
},
|
||||
SSL: ConfigSSL{
|
||||
HandleSSL: false,
|
||||
|
@ -107,8 +108,8 @@ var defaultConfig Config = Config{
|
|||
FirstTimeSetupOTP: "Example otp password",
|
||||
},
|
||||
Webauthn: ConfigWebAuthn{
|
||||
DisplayName: "Linstrom",
|
||||
HashingSecret: "some super secure secret that should never be changed or else password storage breaks",
|
||||
DisplayName: "Linstrom",
|
||||
// HashingSecret: "some super secure secret that should never be changed or else password storage breaks",
|
||||
},
|
||||
Storage: ConfigStorage{
|
||||
Host: "localhost",
|
||||
|
@ -123,6 +124,17 @@ var defaultConfig Config = Config{
|
|||
MaxInMemoryCacheTTL: 5,
|
||||
MaxRedisCacheTTL: nil,
|
||||
},
|
||||
Mail: ConfigMail{
|
||||
Host: "localhost",
|
||||
Port: 587,
|
||||
Username: "linstrom",
|
||||
Password: "linstrom",
|
||||
KeepAliveOverwrite: nil,
|
||||
EncryptionOverwrite: nil,
|
||||
ConnectTimeoutSecondsOverwrite: nil,
|
||||
SendTimeoutSecondsOverwrite: nil,
|
||||
TemplateOverwriteDirectory: nil,
|
||||
},
|
||||
}
|
||||
|
||||
func (gc *ConfigGeneral) GetFullDomain() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue