diff --git a/go/twitterchiver/viewer/viewer.go b/go/twitterchiver/viewer/viewer.go index 8be3a35e23..23df2100c9 100644 --- a/go/twitterchiver/viewer/viewer.go +++ b/go/twitterchiver/viewer/viewer.go @@ -140,7 +140,7 @@ func main() { fmt.Fprintf(rw, "

%s

", wrap) } - authR.Handle("/media/{path}", http.StripPrefix("/media/", http.FileServer(http.Dir(*mediaDirectory)))) + authR.PathPrefix("/media/").Handler(http.StripPrefix("/media/", http.FileServer(http.Dir(*mediaDirectory)))) authR.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) { ctx := r.Context() user := userFromContext(ctx)