mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-26 08:11:55 -06:00
oh yes, yaml, right
This commit is contained in:
parent
598368d2b4
commit
97e06a8321
|
@ -39,7 +39,6 @@ import (
|
||||||
"github.com/matrix-org/gomatrixserverlib/tokens"
|
"github.com/matrix-org/gomatrixserverlib/tokens"
|
||||||
"github.com/matrix-org/util"
|
"github.com/matrix-org/util"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth"
|
"github.com/matrix-org/dendrite/clientapi/auth"
|
||||||
|
@ -553,12 +552,9 @@ func Register(
|
||||||
|
|
||||||
var r registerRequest
|
var r registerRequest
|
||||||
host := gomatrixserverlib.ServerName(req.Host)
|
host := gomatrixserverlib.ServerName(req.Host)
|
||||||
logrus.Infof("Getting virtual host for %q", host)
|
|
||||||
if v := cfg.Matrix.VirtualHostForHTTPHost(host); v != nil {
|
if v := cfg.Matrix.VirtualHostForHTTPHost(host); v != nil {
|
||||||
r.ServerName = v.ServerName
|
r.ServerName = v.ServerName
|
||||||
logrus.Infof("Found virtual host %q", host)
|
|
||||||
} else {
|
} else {
|
||||||
logrus.Infof("Using default %q", cfg.Matrix.ServerName)
|
|
||||||
r.ServerName = cfg.Matrix.ServerName
|
r.ServerName = cfg.Matrix.ServerName
|
||||||
}
|
}
|
||||||
sessionID := gjson.GetBytes(reqBody, "auth.session").String()
|
sessionID := gjson.GetBytes(reqBody, "auth.session").String()
|
||||||
|
|
|
@ -208,10 +208,10 @@ type VirtualHost struct {
|
||||||
MatchHTTPHosts []gomatrixserverlib.ServerName `yaml:"match_http_hosts"`
|
MatchHTTPHosts []gomatrixserverlib.ServerName `yaml:"match_http_hosts"`
|
||||||
|
|
||||||
// Is registration enabled on this virtual host?
|
// 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?
|
// Is guest registration enabled on this virtual host?
|
||||||
AllowGuests bool `json:"allow_guests"`
|
AllowGuests bool `yaml:"allow_guests"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *VirtualHost) Verify(configErrs *ConfigErrors) {
|
func (v *VirtualHost) Verify(configErrs *ConfigErrors) {
|
||||||
|
|
Loading…
Reference in a new issue