fix support for sub folders

This commit is contained in:
visionmercer 2026-03-23 12:13:35 +01:00
commit a4c02cdbc1
2 changed files with 21 additions and 17 deletions

View file

@ -22,11 +22,10 @@ func main() {
mux := http.NewServeMux()
h := handlers.New(*dir)
// Routes
mux.HandleFunc("/browse/", h.BrowseISO)
mux.HandleFunc("/file/", h.DownloadFile)
mux.HandleFunc("/raw/", h.RawFile)
mux.HandleFunc("/", h.ListISOs) // Catch-all for directory navigation
mux.HandleFunc("/", h.ListISOs)
fmt.Printf("ISOSilo running at %s\n", *addr)
log.Fatal(http.ListenAndServe(*addr, mux))