From d6ebc29483c426bd1304ce7f37206bc6082624a1 Mon Sep 17 00:00:00 2001 From: ZizzyDizzyMC Date: Tue, 9 Feb 2021 22:52:18 -0500 Subject: [PATCH] Update upload.go --- upload.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/upload.go b/upload.go index b49e908..9f74350 100644 --- a/upload.go +++ b/upload.go @@ -61,7 +61,7 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) { uploadHeaderProcess(r, &upReq) contentType := r.Header.Get("Content-Type") - + srcIp := r.Header.get("X-Forwarded-For") if strings.HasPrefix(contentType, "multipart/form-data") { file, headers, err := r.FormFile("file") if err != nil { @@ -92,7 +92,6 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) { upReq.expiry = parseExpiry(r.PostFormValue("expires")) upReq.accessKey = r.PostFormValue(accessKeyParamName) - upReq.srcIp := r.Header.get("X-Forwarded-For") if r.PostFormValue("randomize") == "true" { upReq.randomBarename = true }