diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-08-13 12:16:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-13 12:16:37 +0100 |
commit | 9677a95afc529d1766d487db46965266c6fbaa6a (patch) | |
tree | d98ccf518a3f8386054f93be4138988def9848be /mediaapi/routing/routing.go | |
parent | 820c56c165ec8f0409d23cd151a7ff89fbe09ffa (diff) |
API setup refactoring (#1266)
* Start HTTP endpoint refactoring
* Update SetupAndServeHTTP
* Fix builds
* Don't set up external listener if no address configured
* TLS HTTP setup
* Break apart client/federation/key/media muxes
* Tweaks
* Fix P2P demos
* Fix media API routing
* Review comments @Kegsay
* Update sample config
* Fix gobind build
* Fix External -> Public in federation API test
Diffstat (limited to 'mediaapi/routing/routing.go')
-rw-r--r-- | mediaapi/routing/routing.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go index ee5f28f9..75f195cd 100644 --- a/mediaapi/routing/routing.go +++ b/mediaapi/routing/routing.go @@ -32,9 +32,6 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" ) -const pathPrefixR0 = "/media/r0" -const pathPrefixV1 = "/media/v1" // TODO: remove when synapse is fixed - // Setup registers the media API HTTP handlers // // Due to Setup being used to call many other functions, a gocyclo nolint is @@ -47,8 +44,8 @@ func Setup( userAPI userapi.UserInternalAPI, client *gomatrixserverlib.Client, ) { - r0mux := publicAPIMux.PathPrefix(pathPrefixR0).Subrouter() - v1mux := publicAPIMux.PathPrefix(pathPrefixV1).Subrouter() + r0mux := publicAPIMux.PathPrefix("/r0").Subrouter() + v1mux := publicAPIMux.PathPrefix("/v1").Subrouter() activeThumbnailGeneration := &types.ActiveThumbnailGeneration{ PathToResult: map[string]*types.ThumbnailGenerationResult{}, |