CORS Http request from JS client #6244
Replies: 1 comment
-
Posted at 2019-05-23 by @MaBecker this is a good point to start reading https://developer.mozilla.org/de/docs/Web/HTTP/CORS Posted at 2019-05-23 by Bunny Ok I already read that. But How can I enable CORS on Espruino or why's happening that? Posted at 2019-05-24 by DrAzzy use response.writeHead() and write out the CORS header that way. I do it in this code - https://github.com/SpenceKonde/AzzyProjects/blob/master/Animate/Version9.js Posted at 2019-05-24 by @MaBecker extend the res.writeHead and play around with the Access-Control headers
https://developer.mozilla.org/de/docs/Web/HTTP/CORS#The_HTTP_response_headers Let us know, if this works for you. Look like I had missed to hit Posted at 2019-05-28 by Bunny Great way! It's works! Thanks all by your support. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-05-23 by Bunny
Hi friends of Espruino,
I hope that all ours are OK.
Now I'm trying to connect to a Http server made in Espruino like http://forum.espruino.com/conversations/334253/#comment14748665 from JS Client, but happen a error of permission about Access-Control-Allow-Origin because my JS Client is in another server and my Espruino web server is in another IP. How can I enable CORS on Espruino or why's happening that?
Beta Was this translation helpful? Give feedback.
All reactions