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
This commit is contained in:
Neil Alexander 2020-05-22 11:43:17 +01:00 committed by GitHub
parent f223da2f35
commit fe82e1f725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 131 additions and 119 deletions

View file

@ -101,7 +101,7 @@ func SetupAppServiceAPIComponent(
// Set up HTTP Endpoints
routing.Setup(
base.APIMux, base.Cfg, rsAPI,
base.PublicAPIMux, base.Cfg, rsAPI,
accountsDB, federation, transactionsCache,
)

View file

@ -27,7 +27,7 @@ import (
"github.com/matrix-org/util"
)
const pathPrefixApp = "/_matrix/app/v1"
const pathPrefixApp = "/app/v1"
// Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client
// to clients which need to make outbound HTTP requests.