# XSS error with ES 2.3 upgrade

**URL:** <https://discuss.elastic.co/t/xss-error-with-es-2-3-upgrade/46276>\
**Category:** Elasticsearch\
**Created:** [April 4, 2016, 6:02pm UTC](https://discuss.elastic.co/t/xss-error-with-es-2-3-upgrade/46276 "2016-04-04T18:02:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreyL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreyl/32/19365_2.png) [@AndreyL](https://discuss.elastic.co/u/AndreyL)\
**Post date:** [April 4, 2016, 6:02pm UTC](https://discuss.elastic.co/t/xss-error-with-es-2-3-upgrade/46276/1 "2016-04-04T18:02:51Z")

</div>

I just upgraded my local environment from ES 2.2 to ES 2.3 and I started getting this error (using searchkit):

_XMLHttpRequest cannot load [http://localhost:9200/corpus/\_search](http://localhost:9200/corpus/_search). Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response._

It's reproducible by simply making a jQuery.get() on the url.

I do have the same http settings in config/elasticsearch.yml as in 2.2 instance:

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

```

Reverting back to 2.2 instance fixes the error. Any ideas why ES 2.3 has this issue?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 4, 2016, 6:16pm UTC](https://discuss.elastic.co/t/xss-error-with-es-2-3-upgrade/46276/2 "2016-04-04T18:16:30Z")

</div>

I wonder if this is caused by this change: [https://github.com/elastic/elasticsearch/pull/16436](https://github.com/elastic/elasticsearch/pull/16436)

May be add a comment on this issue?

---

<div class="post-metadata">

**Author:** ![AndreyL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreyl/32/19365_2.png) [@AndreyL](https://discuss.elastic.co/u/AndreyL)\
**Post date:** [April 4, 2016, 6:52pm UTC](https://discuss.elastic.co/t/xss-error-with-es-2-3-upgrade/46276/3 "2016-04-04T18:52:19Z")

</div>

It looks like that's what is causing the issue. Surprised nobody else caught it yet. I commented on the pull, hopefully someone will see it

---

<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:** [July 5, 2017, 11:02pm UTC](https://discuss.elastic.co/t/xss-error-with-es-2-3-upgrade/46276/4 "2017-07-05T23:02:31Z")

</div>


