Skip to content

Commit

Permalink
Add default .well-known target
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 18, 2024
1 parent bda772e commit 389f431
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions directmedia.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func newDirectMediaAPI(br *DiscordBridge) *DirectMediaAPI {
Version: br.Version,
},
}
if dma.ks.WellKnownTarget == "" {
dma.ks.WellKnownTarget = fmt.Sprintf("%s:443", dma.cfg.ServerName)
}
mediaRouter := r.PathPrefix("/_matrix/media").Subrouter()
mediaRouter.Use(func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 389f431

Please sign in to comment.