From 0b117133b949ba5834a6f9c3ce4c172b6a9366bd Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Thu, 20 Jul 2017 13:35:06 +0200 Subject: [PATCH] Remove check for >0 upstreams When used solely for auth_request there is no upstream. Instead of forcing users to set a dummy upstream, remove the check. --- options.go | 3 --- options_test.go | 1 - 2 files changed, 4 deletions(-) diff --git a/options.go b/options.go index f1df916..f30b6aa 100644 --- a/options.go +++ b/options.go @@ -121,9 +121,6 @@ func parseURL(to_parse string, urltype string, msgs []string) (*url.URL, []strin func (o *Options) Validate() error { msgs := make([]string, 0) - if len(o.Upstreams) < 1 { - msgs = append(msgs, "missing setting: upstream") - } if o.CookieSecret == "" { msgs = append(msgs, "missing setting: cookie-secret") } diff --git a/options_test.go b/options_test.go index 27dd852..07193dd 100644 --- a/options_test.go +++ b/options_test.go @@ -35,7 +35,6 @@ func TestNewOptions(t *testing.T) { assert.NotEqual(t, nil, err) expected := errorMsg([]string{ - "missing setting: upstream", "missing setting: cookie-secret", "missing setting: client-id", "missing setting: client-secret"})