From 484ce85e65f7dbc623d7cef3e4a8204e5c4f1692 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sun, 28 Sep 2025 14:01:30 +0800 Subject: [PATCH] fix --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index cbbd4f6..151e992 100644 --- a/main.go +++ b/main.go @@ -136,7 +136,9 @@ func main() { defer stream.Close() header := c.Writer.Header() - header.Set("Content-Type", "text/event-stream") + header.Set("Content-Type", "text/event-stream; charset=utf-8") + header.Set("Cache-Control", "no-cache") + header.Set("Connection", "keep-alive") if _, ok := c.Writer.(http.Flusher); !ok { c.JSON(http.StatusInternalServerError, gin.H{"error": "streaming not supported"})