Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Apr 6, 2018
1 parent 9e9fe67 commit b7aeb9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func (p *ReverseProxy) CheckCircuitBreakerEnforced(spec *APISpec, req *http.Requ

func proxyFromAPI(api *APISpec) func(*http.Request) (*url.URL, error) {
return func(req *http.Request) (*url.URL, error) {
if api.Proxy.Transport.ProxyURL != "" {
if api != nil && api.Proxy.Transport.ProxyURL != "" {
return url.Parse(api.Proxy.Transport.ProxyURL)
}
return http.ProxyFromEnvironment(req)
Expand Down

0 comments on commit b7aeb9e

Please sign in to comment.