{"action":"created","issue":{"url":"https://api.github.com/repos/iquidus/explorer/issues/182","repository_url":"https://api.github.com/repos/iquidus/explorer","labels_url":"https://api.github.com/repos/iquidus/explorer/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/iquidus/explorer/issues/182/comments","events_url":"https://api.github.com/repos/iquidus/explorer/issues/182/events","html_url":"https://github.com/iquidus/explorer/issues/182","id":315590168,"number":182,"title":"enable CORS?","user":{"login":"lukepighetti","id":666539,"avatar_url":"https://avatars1.githubusercontent.com/u/666539?v=4","gravatar_id":"","url":"https://api.github.com/users/lukepighetti","html_url":"https://github.com/lukepighetti","followers_url":"https://api.github.com/users/lukepighetti/followers","following_url":"https://api.github.com/users/lukepighetti/following{/other_user}","gists_url":"https://api.github.com/users/lukepighetti/gists{/gist_id}","starred_url":"https://api.github.com/users/lukepighetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukepighetti/subscriptions","organizations_url":"https://api.github.com/users/lukepighetti/orgs","repos_url":"https://api.github.com/users/lukepighetti/repos","events_url":"https://api.github.com/users/lukepighetti/events{/privacy}","received_events_url":"https://api.github.com/users/lukepighetti/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-18T18:21:23Z","updated_at":"2018-04-18T18:26:49Z","closed_at":"2018-04-18T18:26:49Z","author_association":"NONE","body":"I've tried adding this snippet to the base of `app.js` with no success.\r\n\r\n```\r\napp.use(function(req, res, next) {\r\n  res.header(\"Access-Control-Allow-Origin\", \"*\");\r\n  res.header(\"Access-Control-Allow-Headers\", \"Origin, X-Requested-With, Content-Type, Accept\");\r\n  next();\r\n});\r\n```\r\n\r\nHas anyone successfully enabled CORS on iquidus/explorer ?"},"comment":{"url":"https://api.github.com/repos/iquidus/explorer/issues/comments/382483871","html_url":"https://github.com/iquidus/explorer/issues/182#issuecomment-382483871","issue_url":"https://api.github.com/repos/iquidus/explorer/issues/182","id":382483871,"user":{"login":"lukepighetti","id":666539,"avatar_url":"https://avatars1.githubusercontent.com/u/666539?v=4","gravatar_id":"","url":"https://api.github.com/users/lukepighetti","html_url":"https://github.com/lukepighetti","followers_url":"https://api.github.com/users/lukepighetti/followers","following_url":"https://api.github.com/users/lukepighetti/following{/other_user}","gists_url":"https://api.github.com/users/lukepighetti/gists{/gist_id}","starred_url":"https://api.github.com/users/lukepighetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukepighetti/subscriptions","organizations_url":"https://api.github.com/users/lukepighetti/orgs","repos_url":"https://api.github.com/users/lukepighetti/repos","events_url":"https://api.github.com/users/lukepighetti/events{/privacy}","received_events_url":"https://api.github.com/users/lukepighetti/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T18:26:49Z","updated_at":"2018-04-18T18:26:49Z","author_association":"NONE","body":"Put it right after `var app = express()` declaration\r\n\r\n```\r\nvar app = express();\r\n\r\n// enable CORS\r\n\r\napp.use(function(req, res, next) {\r\n  res.header(\"Access-Control-Allow-Origin\", \"*\");\r\n  res.header(\"Access-Control-Allow-Headers\", \"Origin, X-Requested-With, Content-Type, Accept\");\r\n  next();\r\n});\r\n```"}}
{"actor":{"display_login":"lukepighetti"}}