diff --git a/api/middleware/s5.go b/api/middleware/s5.go index f8be175..c082d5a 100644 --- a/api/middleware/s5.go +++ b/api/middleware/s5.go @@ -121,8 +121,14 @@ func BuildS5TusApi(portal interfaces.Portal) jape.Handler { }) }) + stripPrefix := func(h jape.Handler) jape.Handler { + return jape.Adapt(func(h http.Handler) http.Handler { + return http.StripPrefix("/s5/tus/upload/", h) + })(h) + } + // Apply the middlewares to the tusJapeHandler - tusHandler := ApplyMiddlewares(tusJapeHandler, authMiddlewareFunc, protocolMiddleware) + tusHandler := ApplyMiddlewares(tusJapeHandler, stripPrefix, authMiddlewareFunc, protocolMiddleware) return tusHandler }