Enable CORS settings in a Self-Managed Azure Cluster?

Hi
I deployed an Azure Elasticsearch Self-Managed cluster. According to our Dev team, we need to enable CORS by adding these settings into the Configuration File yaml:

    "http.cors.enabled": true,
    "http.cors.allow-origin" : "*",
    "http.cors.allow-methods" : "OPTIONS, HEAD, GET, POST, PUT, DELETE",
    "http.cors.allow-headers" : "Authorization,X-Requested-With,X-Auth-Token,Content-Type

I tried using the API by login to the GUI and going to the Dev Tools and API Console, and then running this:

PUT /_cluster/settings
{
  "persistent" : {
    "http.cors.enabled": true,
    "http.cors.allow-origin" : "*",
    "http.cors.allow-methods" : "OPTIONS, HEAD, GET, POST, PUT, DELETE",
    "http.cors.allow-headers" : "Authorization,X-Requested-With,X-Auth-Token,Content-Type, Content-Length"
  }
}

But I get an error saying that I can't update those dynamically.
The documentation says that I can add these lines into the configuration yaml file, but I'm having trouble understanding on which Node I should modify/add this.
Should I ssh to every node (Master, Client, Data) and add these lines? Or only the Master nodes? Or only the Client node and that will get these propagated?

Thanks in advance

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.