commit
466b552016
|
@ -34,6 +34,7 @@ class WordpressController < ApplicationController
|
||||||
|
|
||||||
# There's also other callbacks:
|
# There's also other callbacks:
|
||||||
# - on_set_cookies
|
# - on_set_cookies
|
||||||
|
# - on_connect
|
||||||
# - on_response
|
# - on_response
|
||||||
# - on_set_cookies
|
# - on_set_cookies
|
||||||
# - on_success
|
# - on_success
|
||||||
|
|
|
@ -7,6 +7,7 @@ module ReverseProxy
|
||||||
@@callback_methods = [
|
@@callback_methods = [
|
||||||
:on_response,
|
:on_response,
|
||||||
:on_set_cookies,
|
:on_set_cookies,
|
||||||
|
:on_connect,
|
||||||
:on_success,
|
:on_success,
|
||||||
:on_redirect,
|
:on_redirect,
|
||||||
:on_missing,
|
:on_missing,
|
||||||
|
@ -87,6 +88,7 @@ module ReverseProxy
|
||||||
|
|
||||||
# Make the request
|
# Make the request
|
||||||
Net::HTTP.start(uri.hostname, uri.port, http_options) do |http|
|
Net::HTTP.start(uri.hostname, uri.port, http_options) do |http|
|
||||||
|
callbacks[:on_connect].call(http)
|
||||||
target_response = http.request(target_request)
|
target_response = http.request(target_request)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue