This commit is contained in:
Tordarus 2022-01-14 17:55:10 +01:00
parent 1de45190fa
commit 225fe84a6b

View File

@ -34,7 +34,7 @@ var (
func main() { func main() {
flag.Parse() flag.Parse()
fileServer = http.FileServer(http.Dir(*directory)) fileServer = http.FileServer(http.Dir(""))
http.HandleFunc("/", handler) http.HandleFunc("/", handler)
dockerhealth.Healthy = true dockerhealth.Healthy = true
@ -95,7 +95,6 @@ func get(w http.ResponseWriter, r *http.Request) {
} }
r.URL.Path = path r.URL.Path = path
fmt.Println(r.URL.Path)
fileServer.ServeHTTP(w, r) fileServer.ServeHTTP(w, r)
} }
@ -145,6 +144,7 @@ func head(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Group-Owner", groupname) w.Header().Add("Group-Owner", groupname)
} }
r.URL.Path = path
fileServer.ServeHTTP(w, r) fileServer.ServeHTTP(w, r)
} }