# Enable CORS settings in a Self-Managed Azure Cluster?

**URL:** <https://discuss.elastic.co/t/enable-cors-settings-in-a-self-managed-azure-cluster/315282>\
**Category:** Elasticsearch\
**Created:** [September 27, 2022, 3:20pm UTC](https://discuss.elastic.co/t/enable-cors-settings-in-a-self-managed-azure-cluster/315282 "2022-09-27T15:20:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dante\_Nahuel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dante_nahuel/32/111349_2.png) [@Dante\_Nahuel](https://discuss.elastic.co/u/Dante_Nahuel)\
**Post date:** [September 27, 2022, 3:20pm UTC](https://discuss.elastic.co/t/enable-cors-settings-in-a-self-managed-azure-cluster/315282/1 "2022-09-27T15:20:36Z")

</div>

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:

```auto
    "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:

```auto
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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2022, 3:20pm UTC](https://discuss.elastic.co/t/enable-cors-settings-in-a-self-managed-azure-cluster/315282/2 "2022-10-25T15:20:58Z")

</div>

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