refactor: put cors middleware 1st

This commit is contained in:
Derrick Hammer 2024-02-03 19:46:02 -05:00
parent 6323fbe166
commit 6894cd7e54
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ func BuildS5TusApi(identity ed25519.PrivateKey, accounts *account.AccountService
} }
// Apply the middlewares to the tusJapeHandler // Apply the middlewares to the tusJapeHandler
tusHandler := middleware.ApplyMiddlewares(tusJapeHandler, middleware.AuthMiddleware(identity, accounts), injectJwt, protocolMiddleware, stripPrefix, middleware.ProxyMiddleware, cors.Default().Handler) tusHandler := middleware.ApplyMiddlewares(tusJapeHandler, cors.Default().Handler, middleware.AuthMiddleware(identity, accounts), injectJwt, protocolMiddleware, stripPrefix, middleware.ProxyMiddleware)
return tusHandler return tusHandler
} }