fix support for sub folders
This commit is contained in:
parent
2c1c506a45
commit
a4c02cdbc1
2 changed files with 21 additions and 17 deletions
3
main.go
3
main.go
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue