-
Notifications
You must be signed in to change notification settings - Fork 169
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
Before handle request method #273
Conversation
Looks like |
@le0pard Thanks for the contribution! If you are able to fix the CI issue, please feel free, or I will in a couple weeks when I have time. |
@ronwsmith hope this will increase speed to accept my PR :) P.S. You can ask Travis CI support to migrate this repo from travis-ci.org to travis-ci.com - https://docs.travis-ci.com/user/migrate/open-source-repository-migration |
@le0pard Awesome, thanks! I'll try to get it in this weekend when I'm back home. |
@ronwsmith hello. How are you? You like disappear from github... |
I'm back @le0pard, thanks for your patience! |
Released in v2.2.0 |
Big thanks @ronwsmith |
Hello.
I have feature proposal, which very valuable for my use cases. My proposal to add new config variable
before_handle_request
, which provide ability to define method to normalize, filter, cleanup request before pass it to handlers. Use cases:Filter sensitive information before store to cache store
If you request from JS code contain some sensitive information, you can remove them or repalce to some dump info by this example
Normalize POST body before store to cache and fetch from cache
Some libs, like braintree.js generate for each request UUID and add this info POST body. This doesn't allow to reuse the same stored cache, because cache key and comparison based on body content. This function allow to replace this dynamic info inside POST body (normalization):