mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Update HTTP clients (#1457)
* Update gomatrixserverlib * Use separate HTTP client for API calls, set User-Agent for outbound HTTP requests
This commit is contained in:
parent
91fc1f1c92
commit
b1d5360335
5 changed files with 33 additions and 26 deletions
|
@ -17,7 +17,6 @@ package main
|
|||
import (
|
||||
"github.com/matrix-org/dendrite/internal/setup"
|
||||
"github.com/matrix-org/dendrite/mediaapi"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -26,7 +25,7 @@ func main() {
|
|||
defer base.Close() // nolint: errcheck
|
||||
|
||||
userAPI := base.UserAPIClient()
|
||||
client := gomatrixserverlib.NewClient(cfg.FederationSender.DisableTLSValidation)
|
||||
client := base.CreateClient()
|
||||
|
||||
mediaapi.AddPublicRoutes(base.PublicMediaAPIMux, &base.Cfg.MediaAPI, userAPI, client)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue