git.iko.soy/typeable/oauth2-proxy
on master help sign in
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.

commit0b117133b949ba5834a6f9c3ce4c172b6a9366bd authorChristian Svensson <blue@cmd.nu> dateThu 20 Jul 2017, 13:35 (9 years ago) parent3c51c91
2 files changed−4
options.go−3 options_test.go−1
options.go−3
@@ -121,9 +121,6 @@ func parseURL(to_parse string, urltype string, msgs []string) (*url.URL, []strin
121121
122122func (o *Options) Validate() error {
123123 msgs := make([]string, 0)
124− if len(o.Upstreams) < 1 {
125− msgs = append(msgs, "missing setting: upstream")
126− }
127124 if o.CookieSecret == "" {
128125 msgs = append(msgs, "missing setting: cookie-secret")
129126 }
options_test.go−1
@@ -35,7 +35,6 @@ func TestNewOptions(t *testing.T) {
3535 assert.NotEqual(t, nil, err)
3636
3737 expected := errorMsg([]string{
38− "missing setting: upstream",
3938 "missing setting: cookie-secret",
4039 "missing setting: client-id",
4140 "missing setting: client-secret"})