Removed unnecessary "/admin" suffix from remote Solr instance admin URL

For quite quite a long time now, the Solr /admin URL suffix indeed
redirects to the Solr base context (see
https://issues.apache.org/jira/browse/SOLR-3337)
pull/137/head
luccioman 7 years ago
parent e2b2c89feb
commit bb74de7d59

@ -284,6 +284,9 @@ public class RemoteInstance implements SolrInstance {
return o instanceof RemoteInstance && ((RemoteInstance) o).solrurl.equals(this.solrurl);
}
/**
* @return the administration URL of the remote Solr instance
*/
public String getAdminInterface() {
final InetAddress localhostExternAddress = Domains.myPublicLocalIP();
final String localhostExtern = localhostExternAddress == null ? "127.0.0.1" : localhostExternAddress.getHostAddress();
@ -292,7 +295,7 @@ public class RemoteInstance implements SolrInstance {
if (p < 0) p = u.indexOf("127.0.0.1",0);
if (p < 0) p = u.indexOf("0:0:0:0:0:0:0:1",0);
if (p >= 0) u = u.substring(0, p) + localhostExtern + u.substring(p + 9);
return u + (u.endsWith("/") ? "admin/" : "/admin/");
return u;
}
@Override

Loading…
Cancel
Save