mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-08 23:43:11 -06:00
Hacks to get join room working
This commit is contained in:
parent
e9bf826255
commit
a9a7472974
|
|
@ -49,6 +49,9 @@ func main() {
|
||||||
// TODO: make the validity period configurable.
|
// TODO: make the validity period configurable.
|
||||||
ValidityPeriod: 24 * time.Hour,
|
ValidityPeriod: 24 * time.Hour,
|
||||||
}
|
}
|
||||||
|
cfg.TLSFingerPrints = []gomatrixserverlib.TLSFingerprint{
|
||||||
|
{[]byte("o\xe2\xd1\x05A7g\xd6=\x10\xdfq\x9e4\xb1:/\x9co>\x01g\x1d\xb8\xbebFf]\xf0\x89N")},
|
||||||
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
cfg.KeyID, cfg.PrivateKey, err = common.ReadKey(serverKey)
|
cfg.KeyID, cfg.PrivateKey, err = common.ReadKey(serverKey)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
pathPrefixV2Keys = "/_matrix/keys/v2"
|
pathPrefixV2Keys = "/_matrix/key/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Setup registers HTTP handlers with the given ServeMux.
|
// Setup registers HTTP handlers with the given ServeMux.
|
||||||
|
|
@ -32,11 +32,12 @@ func Setup(servMux *http.ServeMux, cfg config.FederationAPI) {
|
||||||
apiMux := mux.NewRouter()
|
apiMux := mux.NewRouter()
|
||||||
v2keysmux := apiMux.PathPrefix(pathPrefixV2Keys).Subrouter()
|
v2keysmux := apiMux.PathPrefix(pathPrefixV2Keys).Subrouter()
|
||||||
|
|
||||||
v2keysmux.Handle("/server/",
|
localKeys := makeAPI("localkeys", func(req *http.Request) util.JSONResponse {
|
||||||
makeAPI("localkeys", func(req *http.Request) util.JSONResponse {
|
return readers.LocalKeys(req, cfg)
|
||||||
return readers.LocalKeys(req, cfg)
|
})
|
||||||
}),
|
|
||||||
)
|
v2keysmux.Handle("/server/{keyID}", localKeys)
|
||||||
|
v2keysmux.Handle("/server/", localKeys)
|
||||||
|
|
||||||
servMux.Handle("/metrics", prometheus.Handler())
|
servMux.Handle("/metrics", prometheus.Handler())
|
||||||
servMux.Handle("/api/", http.StripPrefix("/api", apiMux))
|
servMux.Handle("/api/", http.StripPrefix("/api", apiMux))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue