-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Prevent "null" url server url prefix #1003
Prevent "null" url server url prefix #1003
Conversation
} | ||
sb.append(clientConfig.getEurekaServerURLContext()); | ||
} | ||
String serviceUrl = sb.toString(); |
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.
Hi. To replicate the existing behaviour, when the context is not null, this should append an additional /
.
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.
You are right. Added commit to append slash.
if (!clientConfig.getEurekaServerURLContext().startsWith("/")) { | ||
sb.append("/"); | ||
} | ||
sb.append(clientConfig.getEurekaServerURLContext()); |
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.
there should still be a final check here that
if (!clientConfig.getEurekaServerURLContext().endsWith("/") {
sb.append("/");
}
Merging this and addressing the PR comment in a separate PR. |
When set
shouldUseDns
as true with nulleurekaServer.context
,EndpointUtils#getServiceUrlsFromDNS
appends "null" string to service url postfix.e.g. http://ec2-10-0-0-1.ap-northeast-2.compute.amazonaws.com/null/
Fixed this.