From 94c6289641ca95455c384691d699d885a7a16941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Chachu=C5=82a?= Date: Wed, 15 Dec 2021 18:04:00 +0100 Subject: [PATCH] Fix handling of absolute staticDir paths --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index 1c08906..06d6ff5 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,6 @@ import ( "net/http" "net/url" "os" - "path/filepath" "sort" "strconv" "strings" @@ -307,8 +306,7 @@ func main() { } router.Get("/*", func(w http.ResponseWriter, r *http.Request) { - workDir, _ := os.Getwd() - fs := http.FileServer(http.Dir(filepath.Join(workDir, staticDir))) + fs := http.FileServer(http.Dir(staticDir)) fs.ServeHTTP(w, r) }) -- 2.38.5