fix proxy recursion
Marco Andronaco andronacomarco@gmail.com
Mon, 01 Jan 2024 23:40:55 +0100
1 files changed,
5 insertions(+),
2 deletions(-)
jump to
M
invidious/invidious.go
→
invidious/invidious.go
@@ -1,6 +1,7 @@
package invidious import ( + "bytes" "encoding/json" "fmt" "io"@@ -196,9 +197,11 @@
w.Header().Set("content-type", "video/mp4") w.Header().Set("Status", "200") - _, err = io.Copy(w, resp.Body) + temp := bytes.NewBuffer(nil) + _, err = io.Copy(temp, resp.Body) if err == nil { // done - return nil + _, err2 := io.Copy(w, temp) + return err2 } newIndex := formatIndex + 1