apache / solr-operator

Official Kubernetes operator for Apache Solr
https://solr.apache.org/operator
Apache License 2.0
248 stars 111 forks source link

elegant way to enable cross origin resource sharing? #513

Open tzelch opened 1 year ago

tzelch commented 1 year ago

Hi guys,

First of all thanks for everybody working on this operator, it was quite easy to use even for a Solr noob like me :)

I need to access my solr cloud from an angular Application and am running into cross origin errors. The easiest way to enable cross origin resource sharing seems to be to edit the web.xml / webdefault.xml: http://laurenthinoul.com/how-to-enable-cors-in-solr/

On a regular deployment directly in Docker or on a VM this is easily done, but using Kubernetes and the operator it seems there is no easy way to do this and I might have to build a custom solr image.

Figured I asked if somebody else is running the operator and found an elegant solution to enable CORS?

Thanks in advance, Thomas

HoustonPutman commented 1 year ago

I have not done this, but you might be able to use a custom volume in the Solr container and overwrite the web.xml / webdefault.xml.

The option you want to look at is SolrCloud.Spec.customSolrKubeOptions.podOptions.volumes