richpeck / exception_handler

Ruby on Rails Custom Error Pages
507 stars 72 forks source link

rack-attack? #88

Open epipheus opened 4 years ago

epipheus commented 4 years ago

Curious how to get this to work with rack-attack? Can you point me in the right direction?

richpeck commented 4 years ago

Hi there, I would imagine it should work as required? I've not used rack-attack myself, but a quick look at the documentation suggests that it's just adding another layer of middleware. ExceptionHandler simply overrides a hook inside the ActionDispatch::ShowExceptions middleware, meaning that if rack-attack is below ShowExceptions in the middleware stack, any errors should revert to it. If this isn't the case, I can look specifically at it and create a patch, if necessary.

epipheus commented 4 years ago

No need for me to create extra work for you. I swear I saw something in docs but it must have been someone else's page referencing both exception_handler and rack-attack. I will play with it. Thanks for resppnse.

On Sat, Dec 14, 2019, 2:30 AM Richard Peck notifications@github.com wrote:

Hi there, I would imagine it should work as required? I've not used rack-attack myself, but a quick look at the documentation suggests that it's just adding another layer of middleware. ExceptionHandler simply overrides a hook inside the ActionDispatch::ShowExceptions middleware, meaning that if rack-attack is below ShowExceptions in the middleware stack, any errors should revert to it. If this isn't the case, I can look specifically at it and create a patch, if necessary?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richpeck/exception_handler/issues/88?email_source=notifications&email_token=AACVHX5MYXIBHH2XEHXWFP3QYSKUDA5CNFSM4J2ZCE5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG35L6I#issuecomment-565695993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVHX42EWX3WWKDKIZBOTLQYSKUDANCNFSM4J2ZCE5A .

richpeck commented 4 years ago

No problem at all - it wouldn't be that much of an issue for me to play around with it. I'm presently re-doing the README to get rid of all the nonsense in it, so if you have any questions, please let me know.