refactor: explicitly check the path and only for post
This commit is contained in:
parent
a2051acff1
commit
1d1c552a0a
|
@ -143,7 +143,7 @@ func BuildS5TusApi(portal interfaces.Portal) jape.Handler {
|
|||
return jape.Adapt(func(h http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
res := w
|
||||
if r.Method == http.MethodPatch || r.Method == http.MethodPost {
|
||||
if r.Method == http.MethodPost && r.URL.Path == "/s5/upload/tus" {
|
||||
res = &tusJwtResponseWriter{ResponseWriter: w}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue