Closed cjmarkham closed 4 years ago
Hey @cjmarkham, thanks for creating this issue 💚
I'll try to change this behaviour to NOT change default headers when request is made. We can leave this issue as a documentation for it for now.
Hey @cjmarkham, I'm investigating this issue and I can't reproduce removing of headers :(
Could you post your use case and/or some screenshots so I can reproduce this issue and fix it?
Thank you 🍰
I can confirm this. All headers are removed. I worked around it by adding this to the render_async call:
headers: { 'X-Requested-With' => 'XMLHttpRequest' })
Hello, folks. I released a fix for this in 2.1.6. Can you try it out and let me if it's solved? Thanks 🙇
The following change to allow configurable AJAX requests means that all default headers are removed. https://github.com/renderedtext/render_async/pull/52/files#diff-78580168b9e5984e5b82be19fc129f98R27 This posed a problem for those of us using
request.xhr?
in our controllers, which relies on theX-Requested-With
header.It's not a huge issue since I was able to add the header to the helper but it should be noted somewhere in the repo.