diff --git a/htroot/IndexFederated_p.html b/htroot/IndexFederated_p.html
index 3d5de5b18..f0805ae6c 100644
--- a/htroot/IndexFederated_p.html
+++ b/htroot/IndexFederated_p.html
@@ -6,7 +6,7 @@
-
+
The solr schema can also be retrieved as xml here. Click the API icon to see the xml. Just copy this xml to solr/conf/schema.xml to configure solr.
diff --git a/htroot/api/schema_p.java b/htroot/api/schema.java
similarity index 88%
rename from htroot/api/schema_p.java
rename to htroot/api/schema.java
index b006731cb..801905b4f 100644
--- a/htroot/api/schema_p.java
+++ b/htroot/api/schema.java
@@ -23,17 +23,20 @@
*/
import net.yacy.cora.federate.solr.YaCySchema;
+import net.yacy.cora.protocol.HeaderFramework;
import net.yacy.cora.protocol.RequestHeader;
+import net.yacy.cora.protocol.ResponseHeader;
import net.yacy.search.Switchboard;
import net.yacy.search.index.SolrConfiguration;
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
+import net.yacy.server.servletProperties;
-public class schema_p {
+public class schema {
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
- final serverObjects prop = new serverObjects();
+ final servletProperties prop = new servletProperties();
final Switchboard sb = (Switchboard) env;
// write scheme
@@ -72,6 +75,13 @@ public class schema_p {
prop.put("solruniquekey",YaCySchema.id.getSolrFieldName());
prop.put("solrdefaultsearchfield",YaCySchema.text_t.getSolrFieldName());
+
+
+ // add CORS Access header
+ final ResponseHeader outgoingHeader = new ResponseHeader(200);
+ outgoingHeader.put(HeaderFramework.CORS_ALLOW_ORIGIN, "*");
+ prop.setOutgoingHeader(outgoingHeader);
+
// return rewrite properties
return prop;
}
diff --git a/htroot/api/schema_p.xml b/htroot/api/schema.xml
similarity index 100%
rename from htroot/api/schema_p.xml
rename to htroot/api/schema.xml