Skip to content

Commit

Permalink
Set appropriate headers for streamed output
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanh committed Oct 25, 2024
1 parent 5420abf commit cd38e0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ func hookHandler(w http.ResponseWriter, r *http.Request) {
}

if matchedHook.StreamCommandOutput {
w.Header().Set("Content-Type", "text/event-stream")
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Connection", "keep-alive")
handleHook(matchedHook, req, w)
} else if matchedHook.CaptureCommandOutput {
response, err := handleHook(matchedHook, req, nil)
Expand Down

0 comments on commit cd38e0b

Please sign in to comment.