Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ミドルウェアを挿入する場所をより適切に制御することで恩恵を受ける宝石/ライブラリがあります。
特に、例外処理ミドルウェアがスタックの一番上にあるとよいでしょう。
これを行う方法はありますか、またはconfig.ruを編集することによってのみ行うことができますか?
現在、ミドルウェアスタックを手動で注文する以外に、これを行うための本質的な方法はありません。Rack :: Builderにモンキーパッチを適用して、プッシュ/ポップ機能を提供できるハックを見てきました。
https://github.com/joshbuddy/rack-capabilities