From a81917c3e72be13dd0a9680bde54f3ad35c846ab Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Tue, 20 Aug 2019 01:01:53 +0800 Subject: [PATCH] Make trailing slash on server key request optional (#788) Cherry-picked from 7e861b60fbd721b374ec929926b14e57dc60ec41 --- federationapi/routing/routing.go | 1 + testfile | 1 + 2 files changed, 2 insertions(+) diff --git a/federationapi/routing/routing.go b/federationapi/routing/routing.go index ed32c8904..9f576790b 100644 --- a/federationapi/routing/routing.go +++ b/federationapi/routing/routing.go @@ -64,6 +64,7 @@ func Setup( // {keyID} argument and always return a response containing all of the keys. v2keysmux.Handle("/server/{keyID}", localKeys).Methods(http.MethodGet) v2keysmux.Handle("/server/", localKeys).Methods(http.MethodGet) + v2keysmux.Handle("/server", localKeys).Methods(http.MethodGet) v1fedmux.Handle("/send/{txnID}", common.MakeFedAPI( "federation_send", cfg.Matrix.ServerName, keys, diff --git a/testfile b/testfile index cea6a4f46..17978913e 100644 --- a/testfile +++ b/testfile @@ -170,3 +170,4 @@ Deleted tags appear in an incremental v2 /sync Outbound federation can query profile data /event/ on joined room works /event/ does not allow access to events before the user joined +Federation key API allows unsigned requests for keys