Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Solr: Setting HTTP Response Headers From solrconfig.xml For CORS

Is it possible to setup the sending of a custom HTTP response header from within the solrconfig.xml file? I am thinking that it might be possible to add some configuration to the <requestDispatcher> section since it controls caching headers.

I am sure this is possible in the servlet container configuration (Jetty, Tomcat, etc.), but I would like to do this from within Solr's configuration files if at all possible.

If this makes any difference, I am attempting to set an Access-Control-Allow-Origin header for CORS AJAX requests from a different host.

like image 593
Noah Freitas Avatar asked Jun 08 '12 16:06

Noah Freitas


1 Answers

You could use JSONP instead. See this link for an example

  • Solr and JSONP
like image 184
Paige Cook Avatar answered Oct 11 '22 04:10

Paige Cook