move HTTP utilities in a dedicated package (#2123)

needed by #2068
This commit is contained in:
Alessandro Ros 2023-07-30 23:03:00 +02:00 committed by GitHub
parent 08d6d0b888
commit 119d6abf19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 91 additions and 71 deletions

View file

@ -0,0 +1,11 @@
package httpserv
import (
"github.com/gin-gonic/gin"
)
// MiddlewareServerHeader is a middleware that sets the Server header.
func MiddlewareServerHeader(ctx *gin.Context) {
ctx.Writer.Header().Set("Server", "mediamtx")
ctx.Next()
}