Skip to content

provision/docker: use credentials in healthcheck - #1969

Merged
ggarnier merged 2 commits into
tsuru:masterfrom
ggarnier:registry-hc-with-auth
Mar 21, 2018
Merged

provision/docker: use credentials in healthcheck#1969
ggarnier merged 2 commits into
tsuru:masterfrom
ggarnier:registry-hc-with-auth

Conversation

@ggarnier

Copy link
Copy Markdown
Member

No description provided.

Comment thread provision/docker/hc.go Outdated
}
if len(credentials) > 0 {
b64 := base64.StdEncoding.EncodeToString([]byte(credentials))
req.Header.Add("Authorization", "Basic "+b64)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use req.SetBasicAuth() here instead of manually encoding the auth header.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cezarsa done

@ggarnier
ggarnier force-pushed the registry-hc-with-auth branch from dc2ab60 to 6093fab Compare March 20, 2018 21:21
@ggarnier
ggarnier merged commit 39544ac into tsuru:master Mar 21, 2018
@ggarnier
ggarnier deleted the registry-hc-with-auth branch March 21, 2018 13:58
@ggarnier

Copy link
Copy Markdown
Member Author

Related to #1977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants