-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not follow redirects for the health check URLs #5147
Do not follow redirects for the health check URLs #5147
Conversation
27d2030
to
f92aae0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
I agree with you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design LGTM.
f92aae0
to
2b77869
Compare
Hello @coder-hugo, We think that not following the redirect for the health check makes sense but we can't integrate it like that without risking breaking existing users relying on the current behavior. WDYT about integrating it as an health check option? |
3bfe71b
to
94ff137
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
934c907
to
e565e2f
Compare
What does this PR do?
This PR avoids that the health checker follows HTTP redirects.
Motivation
The default behavior of the go HTTP client is to follow redirects and stop after 10 consecutive requests (see). I wouldn't expect this from a health checker. A redirect could point to a completely different host which is broken. The result of this would be that traefik removes a healthy backend.
More
Additional Notes