Where to place the CORS file


#1

I am following the elasticsearch-angular-example by Spence Spalger. The text says to place the CORS file near the config file. But I do not see a config file, just a config directory with 2 YAML files. So where does the CORS file go? Asa YAML file in the config directory?

Thanks for the help..

http.cors:
enabled: true
allow-origin: /https?://localhost(:[0-9]+)?/


(Pemontto) #2

The settings go in your elasticsearch.yml file. See the CORS settings in the documentation


#3

Thank you.. The elasticsearch.yaml file as downloaded only contains comments. Can I delete all and those and insert the CORS text?


(David Pilato) #4

Yes you can.

But often, you want to define cluster.name at least.


#5

Thanks David .. I will read the documentation and define the cluster name there as well.


#6

Thank you .. this worked .. you knew it would ! The example ran fine when I
started elasticsearch.bat on my local drive

Another question. .. I am a real newbie at web development. I deploy an app
to firebase. How do I get firebase to run elasticsearch?

Thanks,

Don.


(system) #7