CORS restrictions with Arduino Create Agent (custom webpage to read serial)


I’m trying to read serial data from an Arduino connected to a machine, locally. I have been using this tool to do so until now: but want a web-based version.

Using the binary version of on Mac OS X, I’m trying to access the websocket interface, and failing due to CORS (or lack of).

<!DOCTYPE html>
  <script src=""></script>
  <script type="text/javascript">
    var socket = io('http://localhost:8991/');

    socket.on('connect', function(){


which returns

XMLHttpRequest cannot load http://localhost:8991/ No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.

Which is odd, as there are various CORS headers defined in the codebase (arduino create etc).

The agent is listening on that port (visiting http://localhost:8991 returns a functioning debug console).

Am I missing something?



This looks relevant: