sys_exec_info
Added CORS, based on http://flask.pocoo.org/snippets/56/