diff --git a/main.go b/main.go index 6c37067..e3108bf 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "leech/config" "leech/route" "net/http" + "net/url" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/filesystem" @@ -30,7 +31,7 @@ func main() { })) for dirName, dirToServe := range config.Config.ServeDirs { - app.Static("/serve/"+dirName, dirToServe) + app.Static("/serve/"+url.QueryEscape(dirName), dirToServe) } app.Listen(config.Config.Host)