fixup! fixup! Use mvi and mn query params to build host url
All checks were successful
CI / build (push) Successful in 1m16s
All checks were successful
CI / build (push) Successful in 1m16s
This commit is contained in:
parent
6f5f04c618
commit
8c755cf28c
1 changed files with 1 additions and 4 deletions
5
main.go
5
main.go
|
@ -100,6 +100,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
|
|
||||||
q := req.URL.Query()
|
q := req.URL.Query()
|
||||||
host := q.Get("host")
|
host := q.Get("host")
|
||||||
|
q.Del("host")
|
||||||
|
|
||||||
if len(host) <= 0 {
|
if len(host) <= 0 {
|
||||||
host = q.Get("hls_chunk_host")
|
host = q.Get("hls_chunk_host")
|
||||||
|
@ -123,12 +124,8 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
host = "rr" + mvi + "---" + mn[0] + ".googlevideo.com"
|
host = "rr" + mvi + "---" + mn[0] + ".googlevideo.com"
|
||||||
} else {
|
|
||||||
io.WriteString(w, "Not possible to build host url from `mvi` and `mn`.")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
q.Del("host")
|
|
||||||
|
|
||||||
parts := strings.Split(strings.ToLower(host), ".")
|
parts := strings.Split(strings.ToLower(host), ".")
|
||||||
|
|
||||||
if len(parts) < 2 {
|
if len(parts) < 2 {
|
||||||
|
|
Loading…
Reference in a new issue