Browse Source

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

pull/2772/head
Alessandro Ros 1 year ago committed by GitHub
parent
commit
50e7b038c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/core/hls_http_server.go

2
internal/core/hls_http_server.go

@ -146,7 +146,7 @@ func (s *hlsHTTPServer) onRequest(ctx *gin.Context) { @@ -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
}

Loading…
Cancel
Save