From cff002b82447a5bed197be1a39ca3e338cd6aa19 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 8 Aug 2023 21:38:10 -0700 Subject: [PATCH] use content type `application/x-ndjson` for streaming responses --- server/routes.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/routes.go b/server/routes.go index c1a694c23..8e14279ad 100644 --- a/server/routes.go +++ b/server/routes.go @@ -367,6 +367,7 @@ func Serve(ln net.Listener, extraOrigins []string) error { } func streamResponse(c *gin.Context, ch chan any) { + c.Header("Content-Type", "application/x-ndjson") c.Stream(func(w io.Writer) bool { val, ok := <-ch if !ok {