updated standalone middleware
The middleware implementation has diverged from the standalone middleware.
This MR updates the standalone middleware according to the middleware in Rodos.
The middleware implementation has diverged from the standalone middleware.
This MR updates the standalone middleware according to the middleware in Rodos.