cli: Fix upload creation when using -basepath=/

Closes https://github.com/tus/tusd/issues/387
This commit is contained in:
Marius 2020-05-25 09:25:55 +02:00
parent fdf168fbb6
commit 52181920c2
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ func Serve() {
if basepath == "/" { if basepath == "/" {
// If the basepath is set to the root path, only install the tusd handler // If the basepath is set to the root path, only install the tusd handler
// and do not show a greeting. // and do not show a greeting.
http.Handle("/", handler) http.Handle("/", http.StripPrefix("/", handler))
} else { } else {
// If a custom basepath is defined, we show a greeting at the root path... // If a custom basepath is defined, we show a greeting at the root path...
http.HandleFunc("/", DisplayGreeting) http.HandleFunc("/", DisplayGreeting)