Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert request_strategy middleware before ActionDispatch::ShowExceptions #682

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

dck
Copy link
Contributor

@dck dck commented Jul 25, 2019

Currently Chewy inserts request_strategy middleware after Rails::Rack::Logger. However people can use their custom loggers or use other gems, for instance https://github.com/rocketjob/rails_semantic_logger

Such gems swap Rails::Rack::Logger middleware with their implementations so on a moment when Chewy wants to insert its middleware after Rails::Rack::Logger it doesn't exist in the chain.

In this PR instead of relying on Rails::Rack::Logger existence we place Chewy middleware before ActionDispatch::ShowExceptions that goes right after loggers.

This also fixes this #286

…xceptions

It used to be included after Rack::Logger. However, people can use other
loggers that swap Rack::Logger so on a moment when Chewy insertion is
executed there is no Rack::Logger in the chain.
@pyromaniac pyromaniac merged commit 082fb25 into master Sep 12, 2019
@pyromaniac pyromaniac deleted the fix-chewy-middleware-insertion branch September 12, 2019 07:28
@ronin ronin mentioned this pull request Sep 16, 2019
@dck dck restored the fix-chewy-middleware-insertion branch September 23, 2019 12:12
@AlfonsoUceda AlfonsoUceda deleted the fix-chewy-middleware-insertion branch January 14, 2021 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants