From 50e7b038c4c13b87013da2bcf267a4e88aa9633a Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Fri, 1 Dec 2023 20:23:04 +0100 Subject: [PATCH] hls: fix appending slash when behind a reverse proxy (#2770) --- internal/core/hls_http_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/hls_http_server.go b/internal/core/hls_http_server.go index e65b8b0e..f4d694eb 100644 --- a/internal/core/hls_http_server.go +++ b/internal/core/hls_http_server.go @@ -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 }