Skip to content

Commit

Permalink
default autoredirect to false
Browse files Browse the repository at this point in the history
Signed-off-by: David Wu <david.wu@docker.com>
  • Loading branch information
David Wu committed Jan 4, 2019
1 parent 40b7b58 commit caf43bb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions registry/auth/token/accesscontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,14 @@ func checkOptions(options map[string]interface{}) (tokenAccessOptions, error) {

opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3]

autoRedirect, ok := options["autoredirect"].(bool)
if !ok {
return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect")
autoRedirectVal, ok := options["autoredirect"]
if ok {
autoRedirect, ok := autoRedirectVal.(bool)
if !ok {
return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect")
}
opts.autoRedirect = autoRedirect
}
opts.autoRedirect = autoRedirect

return opts, nil
}
Expand Down

0 comments on commit caf43bb

Please sign in to comment.