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
Add SRV support for proxy upstream #1915
Conversation
1070887
to
cd63b6e
Compare
cd63b6e
to
fe96a36
Compare
@abiosoft I'd be happy if there is anything I can do to make the review easier for you. |
@abiosoft I'm sorry to be a pest, just want to know if I can help in any way here? |
Got my hands tied recently, I should complete the review today. Thanks for the patience. |
if u.HealthCheck.ContentString == "" { // don't check for content string | ||
return false | ||
} | ||
// TODO ReadAll will be replaced if deemed necessary |
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.
I think ReadAll
is fine here. Considering this is an health check, it is not expected to have large body.
Thank you for your contribution! And thanks Abiola for the review! |
1. What does this change do, exactly?
Adds support in proxy package to discover upstream using SRV lookup
2. Please link to the relevant issues.
Closes ##1803
3. Which documentation changes (if any) need to be made because of this PR?
The proxy module documentation page https://caddyserver.com/docs/proxy required as update:
And a note:
Rationale behind using srv+https protocol
An SRV service locator consists mainly of three parts:
the protocol piece is the ideal way to specify the protocol but it wouldn't be possible to specify all three pieces without changing the proxy directive syntax, or at least without adding new directive in proxy block.
It is also not possible to deduce this information from FQDN. Take for example these FQDNs
.pod-16.my-org.internal
?.my-org.internal
?4. Checklist