Skip to content
Permalink
Browse files

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)
  • Loading branch information...
luccioman committed Apr 8, 2018
1 parent e2b2c89 commit bb74de7d594e0de1b4cf04d728edb7d63b363aca
Showing with 4 additions and 1 deletion.
  1. +4 −1 source/net/yacy/cora/federate/solr/instance/RemoteInstance.java
@@ -284,6 +284,9 @@ public boolean equals(Object o) {
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 String getAdminInterface() {
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

0 comments on commit bb74de7

Please sign in to comment.
You can’t perform that action at this time.