# Config cors setting not working?

**URL:** <https://discuss.elastic.co/t/config-cors-setting-not-working/90189>\
**Category:** Elasticsearch\
**Created:** [June 21, 2017, 2:25am UTC](https://discuss.elastic.co/t/config-cors-setting-not-working/90189 "2017-06-21T02:25:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [June 23, 2017, 6:34am UTC](https://discuss.elastic.co/t/config-cors-setting-not-working/90189/2 "2017-06-23T06:34:59Z")

</div>

> [@Gordon\_Wang](#):
>
> No CORS header, is it right?

CORS is a two-way process. The client sends particular CORS-related headers, and then the server responds appropriately. Unless you tell `curl` to set those request headers, you won't see anything in the response.

If you add the `Origin` header to your request, you should see what you're looking for:

```
$ curl --head http://localhost:9200 -H 'Origin: http://foo.com'

HTTP/1.1 200 OK
access-control-allow-origin: *
content-type: application/json; charset=UTF-8
content-length: 326

```

---

_[View the full topic](https://discuss.elastic.co/t/config-cors-setting-not-working/90189)._
