@@ -131,7 +131,8 @@ func (o *Options) Validate() error {
131131 msgs = append(msgs, "missing setting: client-secret")
132132 }
133133 if o.AuthenticatedEmailsFile == "" && len(o.EmailDomains) == 0 && o.HtpasswdFile == "" {
134− msgs = append(msgs, "missing setting for email validation: email-domain or authenticated-emails-file required.\n use email-domain=* to authorize all email addresses")
134+ msgs = append(msgs, "missing setting for email validation: email-domain or authenticated-emails-file required."+
135+ "\n use email-domain=* to authorize all email addresses")
135136 }
136137
137138 o.redirectURL, msgs = parseURL(o.RedirectURL, "redirect", msgs)
@@ -139,14 +140,13 @@ func (o *Options) Validate() error {
139140 for _, u := range o.Upstreams {
140141 upstreamURL, err := url.Parse(u)
141142 if err != nil {
142− msgs = append(msgs, fmt.Sprintf(
143− "error parsing upstream=%q %s",
144− upstreamURL, err))
145− }
146− if upstreamURL.Path == "" {
147− upstreamURL.Path = "/"
143+ msgs = append(msgs, fmt.Sprintf("error parsing upstream: %s", err))
144+ } else {
145+ if upstreamURL.Path == "" {
146+ upstreamURL.Path = "/"
147+ }
148+ o.proxyURLs = append(o.proxyURLs, upstreamURL)
148149 }
149− o.proxyURLs = append(o.proxyURLs, upstreamURL)
150150 }
151151
152152 for _, u := range o.SkipAuthRegex {