@@ -142,14 +142,13 @@ func (o *Options) Validate() error {
142142 for _, u := range o.Upstreams {
143143 upstreamURL, err := url.Parse(u)
144144 if err != nil {
145− msgs = append(msgs, fmt.Sprintf(
146− "error parsing upstream=%q %s",
147− upstreamURL, err))
148− }
149− if upstreamURL.Path == "" {
150− upstreamURL.Path = "/"
145+ msgs = append(msgs, fmt.Sprintf("error parsing upstream: %s", err))
146+ } else {
147+ if upstreamURL.Path == "" {
148+ upstreamURL.Path = "/"
149+ }
150+ o.proxyURLs = append(o.proxyURLs, upstreamURL)
151151 }
152− o.proxyURLs = append(o.proxyURLs, upstreamURL)
153152 }
154153
155154 for _, u := range o.SkipAuthRegex {