Use Addressable instead of URI in client.rb
This commit is contained in:
parent
b0fbf89559
commit
7fd1c8e9a7
|
@ -45,7 +45,7 @@ module ReverseProxy
|
||||||
source_request = Rack::Request.new(env)
|
source_request = Rack::Request.new(env)
|
||||||
|
|
||||||
# We can pass in a custom path
|
# We can pass in a custom path
|
||||||
uri = URI.parse("#{url}#{options[:path] || env['ORIGINAL_FULLPATH']}")
|
uri = Addressable::URI.parse("#{url}#{options[:path] || env['ORIGINAL_FULLPATH']}")
|
||||||
|
|
||||||
# Initialize request
|
# Initialize request
|
||||||
target_request = Net::HTTP.const_get(source_request.request_method.capitalize).new(uri.request_uri)
|
target_request = Net::HTTP.const_get(source_request.request_method.capitalize).new(uri.request_uri)
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
# DO NOT EDIT THIS FILE DIRECTLY
|
# DO NOT EDIT THIS FILE DIRECTLY
|
||||||
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
# stub: rails-reverse-proxy 0.5.1 ruby lib
|
# stub: rails-reverse-proxy 0.5.2 ruby lib
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "rails-reverse-proxy"
|
s.name = "rails-reverse-proxy"
|
||||||
s.version = "0.5.1"
|
s.version = "0.5.2"
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||||
s.require_paths = ["lib"]
|
s.require_paths = ["lib"]
|
||||||
s.authors = ["James Hu"]
|
s.authors = ["James Hu"]
|
||||||
s.date = "2016-09-14"
|
s.date = "2016-09-27"
|
||||||
s.description = "Reverse proxy for Ruby on Rails"
|
s.description = "Reverse proxy for Ruby on Rails"
|
||||||
s.email = "hello@james.hu"
|
s.email = "hello@james.hu"
|
||||||
s.extra_rdoc_files = [
|
s.extra_rdoc_files = [
|
||||||
|
|
Loading…
Reference in New Issue