diff --git a/cmd/config.toml b/cmd/config.toml index b3f4545..ed04d5c 100644 --- a/cmd/config.toml +++ b/cmd/config.toml @@ -3,6 +3,9 @@ secret = "a key" # Disable registration disabled = false +# bcrypt cost +# https://pkg.go.dev/golang.org/x/crypto/bcrypt#pkg-constants +cost = 10 [server] # Listener address diff --git a/internal/config/config.go b/internal/config/config.go index 0b8a980..a1e1762 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -26,6 +26,7 @@ type Config struct { type Auth struct { Secret string `toml:"secret"` Disabled bool `toml:"disabled"` + Cost int `toml:"cost"` } // Server configuration