refactor: explicitly check the path and only for post

This commit is contained in:
Derrick Hammer 2024-01-20 07:57:09 -05:00
parent a2051acff1
commit 1d1c552a0a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -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}
}