Files
mediamtx/internal/protocols/httpp/handler_server_header.go
T
Alessandro RosandGitHub 7634370818 add read and write timeouts in HTTP servers (#5056)
this prevents zombie connections from piling up.
2025-10-04 10:01:21 +02:00

16 lines
261 B
Go

package httpp
import (
"net/http"
)
// set the Server header.
type handlerServerHeader struct {
h http.Handler
}
func (h *handlerServerHeader) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Server", "mediamtx")
h.h.ServeHTTP(w, r)
}