|
|
|
@ -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
|
|
|
|
|