aboutsummaryrefslogtreecommitdiff
path: root/keyserver
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-05-22 11:43:17 +0100
committerGitHub <noreply@github.com>2020-05-22 11:43:17 +0100
commitfe82e1f7255c05e0bc7a7872a53cf2a1a78ffaa0 (patch)
tree84661722411a9098f1925d2a5192e4c40d0a1122 /keyserver
parentf223da2f35e690e80c6e3d8c1050f0984ab33a2f (diff)
Separate muxes for public and internal APIs (#1056)
* Separate muxes for public and internal APIs * Update client-api-proxy and federation-api-proxy so they don't add /api to the path * Tidy up * Consistent HTTP setup * Set up prefixes properly
Diffstat (limited to 'keyserver')
-rw-r--r--keyserver/keyserver.go2
-rw-r--r--keyserver/routing/routing.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/keyserver/keyserver.go b/keyserver/keyserver.go
index 0f450165..4e785cbc 100644
--- a/keyserver/keyserver.go
+++ b/keyserver/keyserver.go
@@ -28,5 +28,5 @@ func SetupKeyServerComponent(
deviceDB devices.Database,
accountsDB accounts.Database,
) {
- routing.Setup(base.APIMux, base.Cfg, accountsDB, deviceDB)
+ routing.Setup(base.PublicAPIMux, base.Cfg, accountsDB, deviceDB)
}
diff --git a/keyserver/routing/routing.go b/keyserver/routing/routing.go
index 3ca68ade..2d1122c6 100644
--- a/keyserver/routing/routing.go
+++ b/keyserver/routing/routing.go
@@ -27,7 +27,7 @@ import (
"github.com/matrix-org/util"
)
-const pathPrefixR0 = "/_matrix/client/r0"
+const pathPrefixR0 = "/client/r0"
// Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client
// to clients which need to make outbound HTTP requests.
@@ -36,11 +36,11 @@ const pathPrefixR0 = "/_matrix/client/r0"
// applied:
// nolint: gocyclo
func Setup(
- apiMux *mux.Router, cfg *config.Dendrite,
+ publicAPIMux *mux.Router, cfg *config.Dendrite,
accountDB accounts.Database,
deviceDB devices.Database,
) {
- r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
+ r0mux := publicAPIMux.PathPrefix(pathPrefixR0).Subrouter()
authData := auth.Data{
AccountDB: accountDB,