# Javascript CORS Errors

**URL:** <https://discuss.write.as/t/javascript-cors-errors/810>\
**Category:** Platform\
**Tags:** troubleshooting\
**Created:** [September 2, 2019, 7:32pm UTC](https://discuss.write.as/t/javascript-cors-errors/810 "2019-09-02T19:32:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dar13](https://discuss.write.as/user_avatar/discuss.write.as/dar13/32/352_2.png) [@Dar13](https://discuss.write.as/u/Dar13)\
**Post date:** [September 2, 2019, 7:32pm UTC](https://discuss.write.as/t/javascript-cors-errors/810/1 "2019-09-02T19:32:54Z")

</div>

Hello,

I’m trying to do a minor integration of my Write.As blog into my personal website and I can’t get any HTTP request to succeed due to CORS. I have an example up on [JSFiddle](https://jsfiddle.net/rLcs5t4v/), open up the developer console and hit ‘Run’ and you should see a bunch of CORS errors.

As far as I can tell it seems that Write.As isn’t filling out the CORS headers so the browser is rejecting them. I tried working around it by using the ‘no-cors’ mode but then the responses turn into opaque ones that don’t have any data in them.

Thank you for making the API, just need this little change and I’ll be good to go!

---

<div class="post-metadata">

**Author:** ![cjeller1592](https://discuss.write.as/user_avatar/discuss.write.as/cjeller1592/32/128_2.png) [@cjeller1592](https://discuss.write.as/u/cjeller1592)\
**Post date:** [September 3, 2019, 11:46am UTC](https://discuss.write.as/t/javascript-cors-errors/810/2 "2019-09-03T11:46:53Z")

</div>

Hi @Dar13! Thanks for finding this.

In the meantime, you could use a proxy server. I set one up on Glitch using cors-anywhere, a reliable cors proxy library. All you do is prepend the proxy url to the request url. Check out a fork of your JSFiddle example with the proxy [here](https://jsfiddle.net/rgnvbd0e/). It should return a 200 response in the console. Feel free to use that proxy url on your website.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Dar13](https://discuss.write.as/user_avatar/discuss.write.as/dar13/32/352_2.png) [@Dar13](https://discuss.write.as/u/Dar13)\
**Post date:** [June 14, 2020, 7:33pm UTC](https://discuss.write.as/t/javascript-cors-errors/810/3 "2020-06-14T19:33:15Z")

</div>

@cjeller1592, the private bubbler project you mentioned here has been suspended for Terms-of-Service violations, and the issue with Write.As and CORS is not resolved.

I’ll investigate using ‘cors-anywhere’ myself in the meantime.

---

<div class="post-metadata">

**Author:** ![cjeller1592](https://discuss.write.as/user_avatar/discuss.write.as/cjeller1592/32/128_2.png) [@cjeller1592](https://discuss.write.as/u/cjeller1592)\
**Post date:** [June 17, 2020, 10:37am UTC](https://discuss.write.as/t/javascript-cors-errors/810/4 "2020-06-17T10:37:04Z")

</div>

Sorry about that happening @Dar13 — I think trying to host it yourself would probably be the best option at the moment. Remixing the base project in Glitch will probably come to the same conclusion.

But these are temporary solutions to the main problem which is the `No 'Access-Control-Allow-Origin' header is present` error. I’ll make a note about it to the team and see what we can do.
