Return available features in header of backend responses.

The header "X-Spreed-Signaling-Features" will contain a comma-separated list
of feature flags.
This commit is contained in:
Joachim Bauch 2021-10-28 09:19:47 +02:00
parent 70b37364d3
commit 2f8e7f9f66
No known key found for this signature in database
GPG Key ID: 77C1D22D53E15F02
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}
}