Module: Ritm::InterceptUtils
- Included in:
- HTTPForwarder, Proxy::ProxyServer
- Defined in:
- lib/ritm/interception/intercept_utils.rb
Overview
Interceptor callbacks calling logic shared by the HTTP Proxy Server and the SSL Reverse Proxy Server
Instance Method Summary collapse
- #intercept_request(handler, request, intercept_request_settings) ⇒ Object
- #intercept_response(handler, request, response, intercept_response_settings) ⇒ Object
Instance Method Details
#intercept_request(handler, request, intercept_request_settings) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/ritm/interception/intercept_utils.rb', line 6 def intercept_request(handler, request, intercept_request_settings) return if handler.nil? preprocess(request, intercept_request_settings) handler.call(request) postprocess(request, intercept_request_settings) end |
#intercept_response(handler, request, response, intercept_response_settings) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ritm/interception/intercept_utils.rb', line 13 def intercept_response(handler, request, response, intercept_response_settings) return if handler.nil? preprocess(response, intercept_response_settings) handler.call(request, response) postprocess(response, intercept_response_settings) end |