mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-13 10:47:19 +03:00
Add Nginx header to not buffer SSE connection
This should allow the Activity Panel, that uses a Server-Side Events/ Event Source connection, to work with default Nginx reverse proxy configuration.
This commit is contained in:
parent
f63a912341
commit
abaecf2b88
@ -120,6 +120,8 @@ func (b *broker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Cache-Control", "no-cache, no-transform")
|
||||
w.Header().Set("Connection", "keep-alive")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
// Tells Nginx to not buffer this response. See https://stackoverflow.com/a/33414096
|
||||
w.Header().Set("X-Accel-Buffering", "no")
|
||||
|
||||
// Each connection registers its own message channel with the Broker's connections registry
|
||||
c := b.subscribe(r)
|
||||
|
Loading…
x
Reference in New Issue
Block a user