feat: add URL query escape for top level directories
This commit is contained in:
parent
0f0a023bb6
commit
5c4c8269a4
2
main.go
2
main.go
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user