mirror of
https://github.com/versity/versitygw.git
synced 2026-09-22 16:04:15 +00:00
rdma: authenticate RC routes through the terminal error path
The RC auth adapter returned signature-verification errors to Fiber, so the production S3 error handler collapsed them into a generic 500 response; authentication failures lost their real status and code the same way route failures did before the terminal serializer. The adapter now sends verification errors through the shared serializer as well.
This commit is contained in:
+1
-1
@@ -1162,7 +1162,7 @@ func runGateway(ctx context.Context, be backend.Backend) error {
|
||||
// chain as usual.
|
||||
rcAuth := func(ctx fiber.Ctx) error {
|
||||
if err := rcVerify(ctx); err != nil {
|
||||
return err
|
||||
return rcroutes.WriteRouteError(ctx, err)
|
||||
}
|
||||
return ctx.Next()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user