I am getting a CORS error when I test my elasticsearch install. I can use client tools and Postman fine, but when I try to POST for suggestions from a browser, I'm getting a CORS error.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. The response had HTTP status code 401.
I've read up on this quite a bit, and I've added these to my elasticsearch.yml file (just under http.port):
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
But even so, when I try from my browser, I continue to get the same error. Also, a curl doesn't return the allo-origin header like it does in postman. I tried restarting everyhing, but from the GCP console, and then using the restart scripts, and they came back up fine, but continue to throw CORS errors.
Any ideas? This is running against a newly configured bitnami image of elasticsearch on GCP.