From bab243921e25fe07c04f89a9c2c0a7dce6aafc96 Mon Sep 17 00:00:00 2001 From: Xhofe Date: Fri, 18 Feb 2022 19:57:40 +0800 Subject: [PATCH] fix status code --- alist-proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alist-proxy.go b/alist-proxy.go index b184198..e658e66 100644 --- a/alist-proxy.go +++ b/alist-proxy.go @@ -159,7 +159,7 @@ func downHandle(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS") w.Header().Add("Access-Control-Allow-Headers", "range") - w.WriteHeader(res.StatusCode) + w.WriteHeader(res2.StatusCode) _, err = io.Copy(w, res2.Body) if err != nil { errorResponse(w, 500, err.Error())