add autoredirect auth config
It redirects the user to to the Host header's domain whenever they try to use token auth. Signed-off-by: David Wu <david.wu@docker.com>
This commit is contained in:
committed by
David Wu
parent
16128bbac4
commit
f730f3ab77
@@ -82,7 +82,7 @@ type challenge struct {
|
||||
var _ auth.Challenge = challenge{}
|
||||
|
||||
// SetHeaders sets a simple bearer challenge on the response.
|
||||
func (ch challenge) SetHeaders(w http.ResponseWriter) {
|
||||
func (ch challenge) SetHeaders(r *http.Request, w http.ResponseWriter) {
|
||||
header := fmt.Sprintf("Bearer realm=%q,service=%q", ch.realm, ch.service)
|
||||
|
||||
if ch.scope != "" {
|
||||
|
Reference in New Issue
Block a user