feat: add URL query escape for top level directories

This commit is contained in:
Louis Dalibard 2024-06-28 18:03:17 +02:00
parent 0f0a023bb6
commit 5c4c8269a4

View File

@ -2,6 +2,7 @@ package main
import (
"embed"
"fmt"
"leech/config"
"leech/route"
"net/http"
@ -29,6 +30,7 @@ func main() {
}))
for dirName, dirToServe := range config.Config.ServeDirs {
fmt.Println("Registering route /serve/" + url.QueryEscape(dirName))
app.Static("/serve/"+url.QueryEscape(dirName), dirToServe)
}