mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-26 16:21:55 -06:00
Ignore port
This commit is contained in:
parent
8f54d33f1d
commit
8986131367
|
@ -16,6 +16,7 @@ package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -135,6 +136,9 @@ func ClaimOneTimeKeys(
|
||||||
// LocalKeys returns the local keys for the server.
|
// LocalKeys returns the local keys for the server.
|
||||||
// See https://matrix.org/docs/spec/server_server/unstable.html#publishing-keys
|
// See https://matrix.org/docs/spec/server_server/unstable.html#publishing-keys
|
||||||
func LocalKeys(cfg *config.FederationAPI, serverName gomatrixserverlib.ServerName) util.JSONResponse {
|
func LocalKeys(cfg *config.FederationAPI, serverName gomatrixserverlib.ServerName) util.JSONResponse {
|
||||||
|
if h, _, err := net.SplitHostPort(string(serverName)); err == nil {
|
||||||
|
serverName = gomatrixserverlib.ServerName(h)
|
||||||
|
}
|
||||||
keys, err := localKeys(cfg, serverName)
|
keys, err := localKeys(cfg, serverName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return util.MessageResponse(http.StatusNotFound, err.Error())
|
return util.MessageResponse(http.StatusNotFound, err.Error())
|
||||||
|
|
Loading…
Reference in a new issue