Skip to content

Commit b57f50b

Browse files
author
Stephen Dawson-Haggerty
committed
fix bug where proxying only works the first time
1 parent b99f451 commit b57f50b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rack/reverse_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def match?(path)
152152
end
153153

154154
def get_uri(path,env)
155-
_url=(url.respond_to?(:call) ? url.call(env) : url)
155+
_url=(url.respond_to?(:call) ? url.call(env) : url.clone)
156156
if _url =~/\$\d/
157157
match_path(path).to_a.each_with_index { |m, i| _url.gsub!("$#{i.to_s}", m) }
158158
URI(_url)

0 commit comments

Comments
 (0)