From 225fe84a6be018814c03aaff28fe0f9a2c08ccc6 Mon Sep 17 00:00:00 2001 From: Tordarus Date: Fri, 14 Jan 2022 17:55:10 +0100 Subject: [PATCH] fix --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index dfc1150..a9a3958 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,7 @@ var ( func main() { flag.Parse() - fileServer = http.FileServer(http.Dir(*directory)) + fileServer = http.FileServer(http.Dir("")) http.HandleFunc("/", handler) dockerhealth.Healthy = true @@ -95,7 +95,6 @@ func get(w http.ResponseWriter, r *http.Request) { } r.URL.Path = path - fmt.Println(r.URL.Path) fileServer.ServeHTTP(w, r) } @@ -145,6 +144,7 @@ func head(w http.ResponseWriter, r *http.Request) { w.Header().Add("Group-Owner", groupname) } + r.URL.Path = path fileServer.ServeHTTP(w, r) }