Browse Source

Return available features in header of backend responses.

The header "X-Spreed-Signaling-Features" will contain a comma-separated list
of feature flags.
pull/157/head
Joachim Bauch 3 months ago
parent
commit
2f8e7f9f66
No known key found for this signature in database GPG Key ID: 77C1D22D53E15F02
  1. 1
      backend_server.go

1
backend_server.go

@ -166,6 +166,7 @@ func (b *BackendServer) Start(r *mux.Router) error {
func (b *BackendServer) setComonHeaders(f func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Server", "nextcloud-spreed-signaling/"+b.version)
w.Header().Set("X-Spreed-Signaling-Features", strings.Join(b.hub.info.Features, ", "))
f(w, r)
}
}

Loading…
Cancel
Save