added before_send configuration for requests