Skip to content

Commit f30ea0f

Browse files
fix http stream headers
1 parent 60eab02 commit f30ea0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backend/internal/controllers/controllers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ func TeamChannelEventHandler(rtr *router.Router) http.HandlerFunc {
7272
listenerChannel := make(chan protocol.Packet)
7373
teamChannel.AddMember(listenerChannel)
7474

75+
w.Header().Set("Content-Type", "text/event-stream")
76+
w.Header().Set("Cache-Control", "no-cache")
77+
w.Header().Set("Connection", "keep-alive")
78+
w.WriteHeader(http.StatusOK)
79+
7580
flusher, ok := w.(http.Flusher)
7681
if !ok {
7782

0 commit comments

Comments
 (0)