mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-16 06:02:24 +03:00
Federation fixes for virtual hosting
This commit is contained in:
parent
f4ee397734
commit
6650712a1c
73 changed files with 736 additions and 420 deletions
|
@ -231,6 +231,21 @@ func loadConfig(
|
|||
return nil, err
|
||||
}
|
||||
|
||||
for _, v := range c.Global.VirtualHosts {
|
||||
if v.KeyValidityPeriod == 0 {
|
||||
v.KeyValidityPeriod = c.Global.KeyValidityPeriod
|
||||
}
|
||||
if v.PrivateKeyPath == "" {
|
||||
v.KeyID = c.Global.KeyID
|
||||
v.PrivateKey = c.Global.PrivateKey
|
||||
continue
|
||||
}
|
||||
privateKeyPath := absPath(basePath, v.PrivateKeyPath)
|
||||
if v.KeyID, v.PrivateKey, err = LoadMatrixKey(privateKeyPath, readFile); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
for _, key := range c.Global.OldVerifyKeys {
|
||||
switch {
|
||||
case key.PrivateKeyPath != "":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue