Open icobani opened 1 year ago
Done :)))))
func HeadersMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set("Content-Type", "text/event-stream")
c.Writer.Header().Set("Cache-Control", "no-cache")
c.Writer.Header().Set("Connection", "keep-alive")
//c.Writer.Header().Set("Transfer-Encoding", "chunked")
c.Writer.Header().Set("X-Accel-Buffering", "no")
c.Next()
}
}
Description
SSE example not working on live
I'm working on my localhost, everything is fine, but I'm broadcasting on the live server SSE is not working. Does anyone have any suggestions for checkpoints.
I see on server logs ------0*0a0*0***** lines.
I used nginx to my server.
Environment