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.
This commit is contained in:
parent
3c51c914ac
commit
0b117133b9
@ -121,9 +121,6 @@ func parseURL(to_parse string, urltype string, msgs []string) (*url.URL, []strin
|
|||||||
|
|
||||||
func (o *Options) Validate() error {
|
func (o *Options) Validate() error {
|
||||||
msgs := make([]string, 0)
|
msgs := make([]string, 0)
|
||||||
if len(o.Upstreams) < 1 {
|
|
||||||
msgs = append(msgs, "missing setting: upstream")
|
|
||||||
}
|
|
||||||
if o.CookieSecret == "" {
|
if o.CookieSecret == "" {
|
||||||
msgs = append(msgs, "missing setting: cookie-secret")
|
msgs = append(msgs, "missing setting: cookie-secret")
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ func TestNewOptions(t *testing.T) {
|
|||||||
assert.NotEqual(t, nil, err)
|
assert.NotEqual(t, nil, err)
|
||||||
|
|
||||||
expected := errorMsg([]string{
|
expected := errorMsg([]string{
|
||||||
"missing setting: upstream",
|
|
||||||
"missing setting: cookie-secret",
|
"missing setting: cookie-secret",
|
||||||
"missing setting: client-id",
|
"missing setting: client-id",
|
||||||
"missing setting: client-secret"})
|
"missing setting: client-secret"})
|
||||||
|
Loading…
Reference in New Issue
Block a user