hls: fix appending slash when behind a reverse proxy (#2770)

This commit is contained in:
Alessandro Ros 2023-12-01 20:23:04 +01:00 committed by GitHub
parent 0e5e3324a7
commit 50e7b038c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,7 +146,7 @@ func (s *hlsHTTPServer) onRequest(ctx *gin.Context) {
dir, fname = pa, ""
if !strings.HasSuffix(dir, "/") {
l := "/" + dir + "/"
l := ctx.Request.URL.Path[1:] + "/"
if ctx.Request.URL.RawQuery != "" {
l += "?" + ctx.Request.URL.RawQuery
}