oh yes, yaml, right

This commit is contained in:
Neil Alexander 2022-11-18 12:44:22 +00:00
parent 598368d2b4
commit 97e06a8321
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 2 additions and 6 deletions

View file

@ -39,7 +39,6 @@ import (
"github.com/matrix-org/gomatrixserverlib/tokens"
"github.com/matrix-org/util"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/matrix-org/dendrite/clientapi/auth"
@ -553,12 +552,9 @@ func Register(
var r registerRequest
host := gomatrixserverlib.ServerName(req.Host)
logrus.Infof("Getting virtual host for %q", host)
if v := cfg.Matrix.VirtualHostForHTTPHost(host); v != nil {
r.ServerName = v.ServerName
logrus.Infof("Found virtual host %q", host)
} else {
logrus.Infof("Using default %q", cfg.Matrix.ServerName)
r.ServerName = cfg.Matrix.ServerName
}
sessionID := gjson.GetBytes(reqBody, "auth.session").String()

View file

@ -208,10 +208,10 @@ type VirtualHost struct {
MatchHTTPHosts []gomatrixserverlib.ServerName `yaml:"match_http_hosts"`
// Is registration enabled on this virtual host?
AllowRegistration bool `json:"allow_registration"`
AllowRegistration bool `yaml:"allow_registration"`
// Is guest registration enabled on this virtual host?
AllowGuests bool `json:"allow_guests"`
AllowGuests bool `yaml:"allow_guests"`
}
func (v *VirtualHost) Verify(configErrs *ConfigErrors) {