diff --git a/bin/ws.js b/bin/ws.js index 12f68a5..a0e6f28 100755 --- a/bin/ws.js +++ b/bin/ws.js @@ -66,9 +66,15 @@ if (argv.Misc.config){ dope.log(); process.exit(0); }); - + var app = connect(); + /* enable cross-origin requests on all resources */ + app.use(function(req, res, next){ + res.setHeader("Access-Control-Allow-Origin", "*"); + next(); + }); + /* log using --log-format (if supplied) */ var logFormat = argv.Server["log-format"]; if(logFormat) { @@ -91,6 +97,7 @@ if (argv.Misc.config){ /* if no `--log-format` was specified, pipe the default format output into `log-stats`, which prints statistics to the console */ } else { + dope.hideCursor(); app.use(morgan({ stream: logStats({ refreshRate: argv.Server.refreshRate }) })); } diff --git a/test/ajax.html b/test/ajax.html index 134f70a..ee6bbce 100644 --- a/test/ajax.html +++ b/test/ajax.html @@ -9,8 +9,7 @@