{"action":"closed","number":47,"pull_request":{"url":"https://api.github.com/repos/c2corg/v6_api/pulls/47","id":48211430,"html_url":"https://github.com/c2corg/v6_api/pull/47","diff_url":"https://github.com/c2corg/v6_api/pull/47.diff","patch_url":"https://github.com/c2corg/v6_api/pull/47.patch","issue_url":"https://api.github.com/repos/c2corg/v6_api/issues/47","number":47,"state":"closed","locked":false,"title":"Add CORS headers","user":{"login":"asaunier","id":1192331,"avatar_url":"https://avatars.githubusercontent.com/u/1192331?v=3","gravatar_id":"","url":"https://api.github.com/users/asaunier","html_url":"https://github.com/asaunier","followers_url":"https://api.github.com/users/asaunier/followers","following_url":"https://api.github.com/users/asaunier/following{/other_user}","gists_url":"https://api.github.com/users/asaunier/gists{/gist_id}","starred_url":"https://api.github.com/users/asaunier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaunier/subscriptions","organizations_url":"https://api.github.com/users/asaunier/orgs","repos_url":"https://api.github.com/users/asaunier/repos","events_url":"https://api.github.com/users/asaunier/events{/privacy}","received_events_url":"https://api.github.com/users/asaunier/received_events","type":"User","site_admin":false},"body":"In the UI when I try to push data to the API I get the following error in my JS dev tool:\r\n```\r\nXMLHttpRequest cannot load http://c2corgv6-demo.gis.internal:6545/waypoints. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://c2corgv6-demo.gis.internal:6555' is therefore not allowed access. The response had HTTP status code 405.\r\n```\r\n\r\nI have found this solution:\r\nhttp://stackoverflow.com/a/22862087\r\n\r\nbut not sure it is correct/enough since I then get the following error:\r\n```\r\nMLHttpRequest cannot load http://c2corgv6-demo.gis.internal:6545/waypoints. Invalid HTTP status code 405\r\n```","created_at":"2015-10-20T14:52:10Z","updated_at":"2015-10-22T12:00:37Z","closed_at":"2015-10-22T12:00:37Z","merged_at":null,"merge_commit_sha":"e0fcb118579d3fc2eb2d2bd3d996ab934c792691","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/c2corg/v6_api/pulls/47/commits","review_comments_url":"https://api.github.com/repos/c2corg/v6_api/pulls/47/comments","review_comment_url":"https://api.github.com/repos/c2corg/v6_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/c2corg/v6_api/issues/47/comments","statuses_url":"https://api.github.com/repos/c2corg/v6_api/statuses/d10120e0035fe1130ac531251dc05760d6651635","head":{"label":"c2corg:cors","ref":"cors","sha":"d10120e0035fe1130ac531251dc05760d6651635","user":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"repo":{"id":41029840,"name":"v6_api","full_name":"c2corg/v6_api","owner":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c2corg/v6_api","description":"REST API for c2c.org v6","fork":false,"url":"https://api.github.com/repos/c2corg/v6_api","forks_url":"https://api.github.com/repos/c2corg/v6_api/forks","keys_url":"https://api.github.com/repos/c2corg/v6_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c2corg/v6_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c2corg/v6_api/teams","hooks_url":"https://api.github.com/repos/c2corg/v6_api/hooks","issue_events_url":"https://api.github.com/repos/c2corg/v6_api/issues/events{/number}","events_url":"https://api.github.com/repos/c2corg/v6_api/events","assignees_url":"https://api.github.com/repos/c2corg/v6_api/assignees{/user}","branches_url":"https://api.github.com/repos/c2corg/v6_api/branches{/branch}","tags_url":"https://api.github.com/repos/c2corg/v6_api/tags","blobs_url":"https://api.github.com/repos/c2corg/v6_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c2corg/v6_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c2corg/v6_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/c2corg/v6_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c2corg/v6_api/statuses/{sha}","languages_url":"https://api.github.com/repos/c2corg/v6_api/languages","stargazers_url":"https://api.github.com/repos/c2corg/v6_api/stargazers","contributors_url":"https://api.github.com/repos/c2corg/v6_api/contributors","subscribers_url":"https://api.github.com/repos/c2corg/v6_api/subscribers","subscription_url":"https://api.github.com/repos/c2corg/v6_api/subscription","commits_url":"https://api.github.com/repos/c2corg/v6_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/c2corg/v6_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/c2corg/v6_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/c2corg/v6_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/c2corg/v6_api/contents/{+path}","compare_url":"https://api.github.com/repos/c2corg/v6_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c2corg/v6_api/merges","archive_url":"https://api.github.com/repos/c2corg/v6_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c2corg/v6_api/downloads","issues_url":"https://api.github.com/repos/c2corg/v6_api/issues{/number}","pulls_url":"https://api.github.com/repos/c2corg/v6_api/pulls{/number}","milestones_url":"https://api.github.com/repos/c2corg/v6_api/milestones{/number}","notifications_url":"https://api.github.com/repos/c2corg/v6_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c2corg/v6_api/labels{/name}","releases_url":"https://api.github.com/repos/c2corg/v6_api/releases{/id}","created_at":"2015-08-19T11:21:39Z","updated_at":"2015-08-25T15:58:19Z","pushed_at":"2015-10-22T11:17:33Z","git_url":"git://github.com/c2corg/v6_api.git","ssh_url":"git@github.com:c2corg/v6_api.git","clone_url":"https://github.com/c2corg/v6_api.git","svn_url":"https://github.com/c2corg/v6_api","homepage":"","size":724,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":3,"default_branch":"master"}},"base":{"label":"c2corg:master","ref":"master","sha":"d0d783de988540b9bce8e293b8e0bdc9cd51cc63","user":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"repo":{"id":41029840,"name":"v6_api","full_name":"c2corg/v6_api","owner":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c2corg/v6_api","description":"REST API for c2c.org v6","fork":false,"url":"https://api.github.com/repos/c2corg/v6_api","forks_url":"https://api.github.com/repos/c2corg/v6_api/forks","keys_url":"https://api.github.com/repos/c2corg/v6_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c2corg/v6_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c2corg/v6_api/teams","hooks_url":"https://api.github.com/repos/c2corg/v6_api/hooks","issue_events_url":"https://api.github.com/repos/c2corg/v6_api/issues/events{/number}","events_url":"https://api.github.com/repos/c2corg/v6_api/events","assignees_url":"https://api.github.com/repos/c2corg/v6_api/assignees{/user}","branches_url":"https://api.github.com/repos/c2corg/v6_api/branches{/branch}","tags_url":"https://api.github.com/repos/c2corg/v6_api/tags","blobs_url":"https://api.github.com/repos/c2corg/v6_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c2corg/v6_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c2corg/v6_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/c2corg/v6_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c2corg/v6_api/statuses/{sha}","languages_url":"https://api.github.com/repos/c2corg/v6_api/languages","stargazers_url":"https://api.github.com/repos/c2corg/v6_api/stargazers","contributors_url":"https://api.github.com/repos/c2corg/v6_api/contributors","subscribers_url":"https://api.github.com/repos/c2corg/v6_api/subscribers","subscription_url":"https://api.github.com/repos/c2corg/v6_api/subscription","commits_url":"https://api.github.com/repos/c2corg/v6_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/c2corg/v6_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/c2corg/v6_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/c2corg/v6_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/c2corg/v6_api/contents/{+path}","compare_url":"https://api.github.com/repos/c2corg/v6_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c2corg/v6_api/merges","archive_url":"https://api.github.com/repos/c2corg/v6_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c2corg/v6_api/downloads","issues_url":"https://api.github.com/repos/c2corg/v6_api/issues{/number}","pulls_url":"https://api.github.com/repos/c2corg/v6_api/pulls{/number}","milestones_url":"https://api.github.com/repos/c2corg/v6_api/milestones{/number}","notifications_url":"https://api.github.com/repos/c2corg/v6_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c2corg/v6_api/labels{/name}","releases_url":"https://api.github.com/repos/c2corg/v6_api/releases{/id}","created_at":"2015-08-19T11:21:39Z","updated_at":"2015-08-25T15:58:19Z","pushed_at":"2015-10-22T11:17:33Z","git_url":"git://github.com/c2corg/v6_api.git","ssh_url":"git@github.com:c2corg/v6_api.git","clone_url":"https://github.com/c2corg/v6_api.git","svn_url":"https://github.com/c2corg/v6_api","homepage":"","size":724,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/c2corg/v6_api/pulls/47"},"html":{"href":"https://github.com/c2corg/v6_api/pull/47"},"issue":{"href":"https://api.github.com/repos/c2corg/v6_api/issues/47"},"comments":{"href":"https://api.github.com/repos/c2corg/v6_api/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/c2corg/v6_api/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/c2corg/v6_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/c2corg/v6_api/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/c2corg/v6_api/statuses/d10120e0035fe1130ac531251dc05760d6651635"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":1,"additions":15,"deletions":0,"changed_files":1}}