mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
all: fix trailing slash in subrouters
This commit is contained in:
parent
ae2c07fb86
commit
2e7ff3fedd
3 changed files with 10 additions and 5 deletions
|
|
@ -208,12 +208,14 @@ func (mp *MediaProxy) RegisterRoutes(router *http.ServeMux) {
|
|||
NotFound: exerrors.Must(json.Marshal(mautrix.MUnrecognized.WithMessage("Unrecognized endpoint"))),
|
||||
MethodNotAllowed: exerrors.Must(json.Marshal(mautrix.MUnrecognized.WithMessage("Invalid method for endpoint"))),
|
||||
}
|
||||
router.Handle("/_matrix/federation", exhttp.ApplyMiddleware(
|
||||
router.Handle("/_matrix/federation/", exhttp.ApplyMiddleware(
|
||||
mp.FederationRouter,
|
||||
exhttp.StripPrefix("/_matrix/federation"),
|
||||
exhttp.HandleErrors(errorBodies),
|
||||
))
|
||||
router.Handle("/_matrix/client/v1/media", exhttp.ApplyMiddleware(
|
||||
router.Handle("/_matrix/client/v1/media/", exhttp.ApplyMiddleware(
|
||||
mp.ClientMediaRouter,
|
||||
exhttp.StripPrefix("/_matrix/client/v1/media"),
|
||||
exhttp.CORSMiddleware,
|
||||
exhttp.HandleErrors(errorBodies),
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue