# Request header field Dont-Chunk is not allowed by Access-Control-Allow-Headers in preflight response

**URL:** https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469
**Category:** Bug
**Created:** [August 31, 2016, 2:51am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469 "2016-08-31T02:51:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![brahn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brahn/32/109267_2.png) [@brahn](https://meta.discourse.org/u/brahn)
#### Post date: [August 31, 2016, 2:51am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469/1 "2016-08-31T02:51:39Z")

</div>

After setting up [Full site CDN acceleration for Discourse](https://meta.discourse.org/t/full-site-cdn-acceleration-for-discourse/21467) I am seeing the following in chrome console:

> XMLHttpRequest cannot load [https://mydomain.com/message-bus/d487d3e56113405b95d297fbc468c99d/poll?dlp=t](https://mydomain.com/message-bus/d487d3e56113405b95d297fbc468c99d/poll?dlp=t). Request header field Dont-Chunk is not allowed by Access-Control-Allow-Headers in preflight response.

Also, it doesn’t seem to always happen and it seems to be only those requests with the `?dip=t` parameter:

 ![](https://global.discourse-cdn.com/meta/original/3X/b/6/b6006991c63032a8d06400558715200af0441938.png)

The site is on stable, v1.6.1 and I am assuming that something in my config is not quite right but I am not sure where to start.

Any hints on where to look or how to approach diagnosing this?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 31, 2016, 2:53am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469/2 "2016-08-31T02:53:06Z")

</div>

Interesting, this is actually a but in our Access control process

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 31, 2016, 2:57am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469/3 "2016-08-31T02:57:39Z")

</div>

Can you try:

[https://github.com/discourse/discourse/commit/50379183e1deb6c3fae4b17ec46b96d1a18180c1](https://github.com/discourse/discourse/commit/50379183e1deb6c3fae4b17ec46b96d1a18180c1)

---

<div class="post-metadata">

### Author: ![brahn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brahn/32/109267_2.png) [@brahn](https://meta.discourse.org/u/brahn)
#### Post date: [August 31, 2016, 3:00am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469/4 "2016-08-31T03:00:37Z")

</div>

Thanks @sam  
Can I push that into the rails app within the container somehow, just for testing, or is the only way to rebuild on the development branch?

Edit: I entered the app, edited this file and restart unicorn. That sound about right? Testing now…

---

<div class="post-metadata">

### Author: ![brahn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brahn/32/109267_2.png) [@brahn](https://meta.discourse.org/u/brahn)
#### Post date: [August 31, 2016, 3:37am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469/5 "2016-08-31T03:37:10Z")

</div>

This appears to be working for me now. Many thanks!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 31, 2016, 3:37am UTC](https://meta.discourse.org/t/request-header-field-dont-chunk-is-not-allowed-by-access-control-allow-headers-in-preflight-response/49469/6 "2016-08-31T03:37:51Z")

</div>


