hls: add Server header

This commit is contained in:
aler9
2021-10-17 16:51:35 +02:00
parent ef3fab477e
commit b65d715f0b
2 changed files with 8 additions and 7 deletions

View File

@@ -329,10 +329,10 @@ func (a *api) mwLog(ctx *gin.Context) {
blw := &logWriter{ResponseWriter: ctx.Writer}
ctx.Writer = blw
ctx.Next()
ctx.Writer.Header().Set("Server", "rtsp-simple-server")
ctx.Next()
var buf bytes.Buffer
fmt.Fprintf(&buf, "%s %d %s\n", ctx.Request.Proto, ctx.Writer.Status(), http.StatusText(ctx.Writer.Status()))
ctx.Writer.Header().Write(&buf)