fix: 404 if path is undefined
This commit is contained in:
parent
e3c83d0801
commit
be2daeb535
5
main.go
5
main.go
@ -275,6 +275,11 @@ func handleDirectDownload(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func handleRoot(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path != "/" && r.URL.Path != "" {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
ctx := NewContext(r)
|
||||
formats := []DownloadFormats{}
|
||||
formats = append(formats, DownloadFormats{
|
||||
|
Loading…
Reference in New Issue
Block a user