Method: Rack::RequestReplication::Forwarder#initialize

Defined in:
lib/rack/request_replication/forwarder.rb

#initialize(app, options = {}) ⇒ Forwarder

Returns a new instance of Forwarder.

Parameters:

  • app (#call)
  • options (Hash{Symbol => Object}) (defaults to: {})

Options Hash (options):

  • :host (String) — default: 'localhost'
  • :port (Integer) — default: 8080
  • :session_key (String) — default: 'rack.session'
  • :use_ssl (Bool) — default: false
  • :verify_ssl (Bool) — default: true
  • :basic_auth (Hash{Symbol => Object})

    @option basic_auth [String] :user @option basic_auth [String] :password

  • :redis (Hash{Symbol => Object})

    @option redis [String] :host (‘localhost’) @option redis [Integer] :port (6379) @option redis [String] :db (‘rack-request-replication’)



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rack/request_replication/forwarder.rb', line 35

def initialize( app, options = {} )
  @app = app
  @options = {
    host: 'localhost',
    port: 8080,
    use_ssl: false,
    verify_ssl: true,
    session_key: 'rack.session',
    root_url: '/',
    redis: {}
  }.merge options
end