Sha256: 3731c0e51ed10e910dd90da6fdf854fc9cfd8bf953c66fa293b2228036b7025f

Contents?: true

Size: 468 Bytes

Versions: 10

Compression:

Stored size: 468 Bytes

Contents

class SiteHub
  class ForwardProxy
    include Equality

    attr_reader :downstream_client, :mapped_path, :mapped_url

    transient :downstream_client

    def initialize(mapped_path:, mapped_url:)
      @downstream_client = DownstreamClient.new
      @mapped_path = mapped_path
      @mapped_url = mapped_url
    end

    def call(env)
      request = env[REQUEST]
      request.map(mapped_path, mapped_url)

      downstream_client.call(request)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sitehub-0.5.0.alpha12 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha11 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha10 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha8 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha7 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha6 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha5 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha4 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha3 lib/sitehub/forward_proxy.rb
sitehub-0.5.0.alpha2 lib/sitehub/forward_proxy.rb