From 52181920c22ef6391f69a8974dc1c495224d7209 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 25 May 2020 09:25:55 +0200 Subject: [PATCH] cli: Fix upload creation when using -basepath=/ Closes https://github.com/tus/tusd/issues/387 --- cmd/tusd/cli/serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tusd/cli/serve.go b/cmd/tusd/cli/serve.go index f7232ba..fc63fd7 100644 --- a/cmd/tusd/cli/serve.go +++ b/cmd/tusd/cli/serve.go @@ -61,7 +61,7 @@ func Serve() { if basepath == "/" { // If the basepath is set to the root path, only install the tusd handler // and do not show a greeting. - http.Handle("/", handler) + http.Handle("/", http.StripPrefix("/", handler)) } else { // If a custom basepath is defined, we show a greeting at the root path... http.HandleFunc("/", DisplayGreeting)