Commit cff002b8 authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

use content type `application/x-ndjson` for streaming responses

parent 55cf5021
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment