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) ⇒ Object
- #intercept_response(handler, request, response) ⇒ Object
Instance Method Details
#intercept_request(handler, request) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/ritm/interception/intercept_utils.rb', line 6 def intercept_request(handler, request) return if handler.nil? preprocess(request, Ritm.conf.intercept.request) handler.call(request) postprocess(request, Ritm.conf.intercept.request) end |
#intercept_response(handler, request, response) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ritm/interception/intercept_utils.rb', line 13 def intercept_response(handler, request, response) return if handler.nil? preprocess(response, Ritm.conf.intercept.response) handler.call(request, response) postprocess(response, Ritm.conf.intercept.response) end |