In a rails app RequestStore::Middleware is automatically inserted after ActionDispatch::RequestId. We have middleware before that which, in its ensure block, wants to access values from the RequestStore that were set in the app. The RequestStore::Middleware however in it ensure block clears everything. Is there a clean way to either prevent RequestStore::Middleware from being inserted automatically in the middleware stack or have it sit earlier in the stack?
Hey @lawrencepit ; sorry I never replied to this issue. I'm going to assume that you either figured it out or didn't use this gem, so i'm going to give it a close.
In a rails app RequestStore::Middleware is automatically inserted after ActionDispatch::RequestId. We have middleware before that which, in its ensure block, wants to access values from the RequestStore that were set in the app. The RequestStore::Middleware however in it ensure block clears everything. Is there a clean way to either prevent RequestStore::Middleware from being inserted automatically in the middleware stack or have it sit earlier in the stack?