Try to sane default on jetstream base path

This commit is contained in:
Neil Alexander 2021-07-14 15:22:25 +01:00
parent ec4e0302c0
commit ee6bfe24f5
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 13 additions and 7 deletions

View file

@ -1,8 +1,6 @@
package main
import (
"crypto/rand"
"encoding/hex"
"flag"
"fmt"
@ -72,9 +70,6 @@ func main() {
// don't hit matrix.org when running tests!!!
cfg.SigningKeyServer.KeyPerspectives = config.KeyPerspectives{}
cfg.UserAPI.BCryptCost = bcrypt.MinCost
var id [8]byte
_, _ = rand.Read(id[:])
cfg.Global.JetStream.StoragePath = config.Path(hex.EncodeToString(id[:]))
}
j, err := yaml.Marshal(cfg)