File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ def dummy_app
12
12
lambda { [ 200 , { } , [ 'Dummy App' ] ] }
13
13
end
14
14
15
+
15
16
describe "as middleware" do
16
17
def app
17
18
Rack ::ReverseProxy . new ( dummy_app ) do
@@ -58,6 +59,20 @@ def app
58
59
end
59
60
end
60
61
62
+ describe "with a https route" do
63
+ def app
64
+ Rack ::ReverseProxy . new ( dummy_app ) do
65
+ reverse_proxy '/test' , 'https://example.com'
66
+ end
67
+ end
68
+
69
+ it "should rewrite HOST" do
70
+ stub_request ( :get , 'https://example.com/test/stuff' ) . with ( :headers => { "Host" => "example.com" } ) . to_return ( { :body => "Proxied App" } )
71
+ get '/test/stuff'
72
+ last_response . body . should == "Proxied App"
73
+ end
74
+ end
75
+
61
76
describe "with a route as a string" do
62
77
def app
63
78
Rack ::ReverseProxy . new ( dummy_app ) do
You can’t perform that action at this time.
0 commit comments