From 2f3788f0df1e525b1043eb0a07f20e5e7154a39d Mon Sep 17 00:00:00 2001 From: Alexander Andryashin Date: Thu, 31 Aug 2023 20:51:50 +0300 Subject: [PATCH] Add https to download path. --- proxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy.go b/proxy.go index 0ea2117..2a190ab 100644 --- a/proxy.go +++ b/proxy.go @@ -783,6 +783,9 @@ func proxyStatic(w http.ResponseWriter, r *http.Request, route string, invalidUr (&httputil.ReverseProxy{ Director: func(r *http.Request) { r.URL.Scheme = "http" + if h.Scheme != "" { + r.URL.Scheme = h.Scheme + } r.URL.Host = h.Net() r.URL.Path = pathProvider(remainder) log.Printf("[%d] [-] [%s] [%s] [%s] [%s] [-] [%s] [-] [-]\n", id, proxyingMessage, user, remote, r.URL, remainder)