mediamtx/internal/protocols/httpp/handler_server_header.go
Alessandro Ros 7634370818
Some checks failed
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
add read and write timeouts in HTTP servers (#5056)
this prevents zombie connections from piling up.
2025-10-04 10:01:21 +02:00

15 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)
}