From 6894cd7e54020e8054149c1edc1afcc4acce7a7b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 3 Feb 2024 19:46:02 -0500 Subject: [PATCH] refactor: put cors middleware 1st --- api/s5/s5.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/s5/s5.go b/api/s5/s5.go index a80ba0e..8b1d6ca 100644 --- a/api/s5/s5.go +++ b/api/s5/s5.go @@ -200,7 +200,7 @@ func BuildS5TusApi(identity ed25519.PrivateKey, accounts *account.AccountService } // 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 }