{"action":"closed","number":295,"pull_request":{"url":"https://api.github.com/repos/nknorg/nkn/pulls/295","id":215838633,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1ODM4NjMz","html_url":"https://github.com/nknorg/nkn/pull/295","diff_url":"https://github.com/nknorg/nkn/pull/295.diff","patch_url":"https://github.com/nknorg/nkn/pull/295.patch","issue_url":"https://api.github.com/repos/nknorg/nkn/issues/295","number":295,"state":"closed","locked":false,"title":"Fixed RPCServer throwing errors on CORS preflight","user":{"login":"CrackDavid","id":4178312,"node_id":"MDQ6VXNlcjQxNzgzMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/4178312?v=4","gravatar_id":"","url":"https://api.github.com/users/CrackDavid","html_url":"https://github.com/CrackDavid","followers_url":"https://api.github.com/users/CrackDavid/followers","following_url":"https://api.github.com/users/CrackDavid/following{/other_user}","gists_url":"https://api.github.com/users/CrackDavid/gists{/gist_id}","starred_url":"https://api.github.com/users/CrackDavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrackDavid/subscriptions","organizations_url":"https://api.github.com/users/CrackDavid/orgs","repos_url":"https://api.github.com/users/CrackDavid/repos","events_url":"https://api.github.com/users/CrackDavid/events{/privacy}","received_events_url":"https://api.github.com/users/CrackDavid/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Christian Busch <kontakt@christian-busch.com>\r\n\r\n### Proposed changes in this pull request\r\nSome Servers sent a CORS preflight to see if the endpoint can actually understand the CORS-protocol. This is a OPTIONS request that causes the RPCServer to run into an error (https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request). \r\nMade RPCServer.go only to listen for POST-requests and allowed needed header-requests.\r\n\r\n### Type (put an `x` where ever applicable)\r\n- [x] Bug fix\r\n- [ ] Feature (Non-breaking change)\r\n- [ ] Feature (Breaking change)\r\n- [ ] Documentation Improvement\r\n\r\n### Checklist\r\nPlease put an `x` against the checkboxes. Write a small comment explaining if its `N/A` (not applicable)\r\n\r\n- [x] Read the [CONTRIBUTION guidelines](https://github.com/nknorg/nkn#contributing).\r\n- [ ] All the tests are passing after the introduction of new changes.\r\n- [ ] Added tests respective to the part of code I have written.\r\n- [ ] Added proper documentation where ever applicable (in code and README.md).\r\n- [x] Code has been written according to [NKN-Golang-Style-Guide](https://github.com/nknorg/nkn/wiki/NKN-Golang-Style-Guide)\r\n\r\n### Extra information\r\nnone\r\n","created_at":"2018-09-16T18:42:55Z","updated_at":"2018-09-26T06:10:52Z","closed_at":"2018-09-26T06:10:52Z","merged_at":"2018-09-26T06:10:52Z","merge_commit_sha":"65c85a2f18bc093b2300caf324d94c5edd7feb1d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nknorg/nkn/pulls/295/commits","review_comments_url":"https://api.github.com/repos/nknorg/nkn/pulls/295/comments","review_comment_url":"https://api.github.com/repos/nknorg/nkn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nknorg/nkn/issues/295/comments","statuses_url":"https://api.github.com/repos/nknorg/nkn/statuses/67666aaa5994353355e9f5a8cac07de5e70925a7","head":{"label":"CrackDavid:master","ref":"master","sha":"67666aaa5994353355e9f5a8cac07de5e70925a7","user":{"login":"CrackDavid","id":4178312,"node_id":"MDQ6VXNlcjQxNzgzMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/4178312?v=4","gravatar_id":"","url":"https://api.github.com/users/CrackDavid","html_url":"https://github.com/CrackDavid","followers_url":"https://api.github.com/users/CrackDavid/followers","following_url":"https://api.github.com/users/CrackDavid/following{/other_user}","gists_url":"https://api.github.com/users/CrackDavid/gists{/gist_id}","starred_url":"https://api.github.com/users/CrackDavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrackDavid/subscriptions","organizations_url":"https://api.github.com/users/CrackDavid/orgs","repos_url":"https://api.github.com/users/CrackDavid/repos","events_url":"https://api.github.com/users/CrackDavid/events{/privacy}","received_events_url":"https://api.github.com/users/CrackDavid/received_events","type":"User","site_admin":false},"repo":{"id":141564588,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1NjQ1ODg=","name":"nkn","full_name":"CrackDavid/nkn","private":false,"owner":{"login":"CrackDavid","id":4178312,"node_id":"MDQ6VXNlcjQxNzgzMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/4178312?v=4","gravatar_id":"","url":"https://api.github.com/users/CrackDavid","html_url":"https://github.com/CrackDavid","followers_url":"https://api.github.com/users/CrackDavid/followers","following_url":"https://api.github.com/users/CrackDavid/following{/other_user}","gists_url":"https://api.github.com/users/CrackDavid/gists{/gist_id}","starred_url":"https://api.github.com/users/CrackDavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrackDavid/subscriptions","organizations_url":"https://api.github.com/users/CrackDavid/orgs","repos_url":"https://api.github.com/users/CrackDavid/repos","events_url":"https://api.github.com/users/CrackDavid/events{/privacy}","received_events_url":"https://api.github.com/users/CrackDavid/received_events","type":"User","site_admin":false},"html_url":"https://github.com/CrackDavid/nkn","description":"NKN blockchain system in Golang","fork":true,"url":"https://api.github.com/repos/CrackDavid/nkn","forks_url":"https://api.github.com/repos/CrackDavid/nkn/forks","keys_url":"https://api.github.com/repos/CrackDavid/nkn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CrackDavid/nkn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CrackDavid/nkn/teams","hooks_url":"https://api.github.com/repos/CrackDavid/nkn/hooks","issue_events_url":"https://api.github.com/repos/CrackDavid/nkn/issues/events{/number}","events_url":"https://api.github.com/repos/CrackDavid/nkn/events","assignees_url":"https://api.github.com/repos/CrackDavid/nkn/assignees{/user}","branches_url":"https://api.github.com/repos/CrackDavid/nkn/branches{/branch}","tags_url":"https://api.github.com/repos/CrackDavid/nkn/tags","blobs_url":"https://api.github.com/repos/CrackDavid/nkn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CrackDavid/nkn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CrackDavid/nkn/git/refs{/sha}","trees_url":"https://api.github.com/repos/CrackDavid/nkn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CrackDavid/nkn/statuses/{sha}","languages_url":"https://api.github.com/repos/CrackDavid/nkn/languages","stargazers_url":"https://api.github.com/repos/CrackDavid/nkn/stargazers","contributors_url":"https://api.github.com/repos/CrackDavid/nkn/contributors","subscribers_url":"https://api.github.com/repos/CrackDavid/nkn/subscribers","subscription_url":"https://api.github.com/repos/CrackDavid/nkn/subscription","commits_url":"https://api.github.com/repos/CrackDavid/nkn/commits{/sha}","git_commits_url":"https://api.github.com/repos/CrackDavid/nkn/git/commits{/sha}","comments_url":"https://api.github.com/repos/CrackDavid/nkn/comments{/number}","issue_comment_url":"https://api.github.com/repos/CrackDavid/nkn/issues/comments{/number}","contents_url":"https://api.github.com/repos/CrackDavid/nkn/contents/{+path}","compare_url":"https://api.github.com/repos/CrackDavid/nkn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CrackDavid/nkn/merges","archive_url":"https://api.github.com/repos/CrackDavid/nkn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CrackDavid/nkn/downloads","issues_url":"https://api.github.com/repos/CrackDavid/nkn/issues{/number}","pulls_url":"https://api.github.com/repos/CrackDavid/nkn/pulls{/number}","milestones_url":"https://api.github.com/repos/CrackDavid/nkn/milestones{/number}","notifications_url":"https://api.github.com/repos/CrackDavid/nkn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CrackDavid/nkn/labels{/name}","releases_url":"https://api.github.com/repos/CrackDavid/nkn/releases{/id}","deployments_url":"https://api.github.com/repos/CrackDavid/nkn/deployments","created_at":"2018-07-19T10:35:18Z","updated_at":"2018-09-26T06:05:55Z","pushed_at":"2018-09-26T06:05:53Z","git_url":"git://github.com/CrackDavid/nkn.git","ssh_url":"git@github.com:CrackDavid/nkn.git","clone_url":"https://github.com/CrackDavid/nkn.git","svn_url":"https://github.com/CrackDavid/nkn","homepage":"https://www.nkn.org","size":2957,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nknorg:master","ref":"master","sha":"980bbfc023127c31970f30d0e6d34278ca7cd17c","user":{"login":"nknorg","id":35023685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDIzNjg1","avatar_url":"https://avatars0.githubusercontent.com/u/35023685?v=4","gravatar_id":"","url":"https://api.github.com/users/nknorg","html_url":"https://github.com/nknorg","followers_url":"https://api.github.com/users/nknorg/followers","following_url":"https://api.github.com/users/nknorg/following{/other_user}","gists_url":"https://api.github.com/users/nknorg/gists{/gist_id}","starred_url":"https://api.github.com/users/nknorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknorg/subscriptions","organizations_url":"https://api.github.com/users/nknorg/orgs","repos_url":"https://api.github.com/users/nknorg/repos","events_url":"https://api.github.com/users/nknorg/events{/privacy}","received_events_url":"https://api.github.com/users/nknorg/received_events","type":"Organization","site_admin":false},"repo":{"id":119047243,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkwNDcyNDM=","name":"nkn","full_name":"nknorg/nkn","private":false,"owner":{"login":"nknorg","id":35023685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDIzNjg1","avatar_url":"https://avatars0.githubusercontent.com/u/35023685?v=4","gravatar_id":"","url":"https://api.github.com/users/nknorg","html_url":"https://github.com/nknorg","followers_url":"https://api.github.com/users/nknorg/followers","following_url":"https://api.github.com/users/nknorg/following{/other_user}","gists_url":"https://api.github.com/users/nknorg/gists{/gist_id}","starred_url":"https://api.github.com/users/nknorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknorg/subscriptions","organizations_url":"https://api.github.com/users/nknorg/orgs","repos_url":"https://api.github.com/users/nknorg/repos","events_url":"https://api.github.com/users/nknorg/events{/privacy}","received_events_url":"https://api.github.com/users/nknorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nknorg/nkn","description":"NKN blockchain system in Golang","fork":false,"url":"https://api.github.com/repos/nknorg/nkn","forks_url":"https://api.github.com/repos/nknorg/nkn/forks","keys_url":"https://api.github.com/repos/nknorg/nkn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nknorg/nkn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nknorg/nkn/teams","hooks_url":"https://api.github.com/repos/nknorg/nkn/hooks","issue_events_url":"https://api.github.com/repos/nknorg/nkn/issues/events{/number}","events_url":"https://api.github.com/repos/nknorg/nkn/events","assignees_url":"https://api.github.com/repos/nknorg/nkn/assignees{/user}","branches_url":"https://api.github.com/repos/nknorg/nkn/branches{/branch}","tags_url":"https://api.github.com/repos/nknorg/nkn/tags","blobs_url":"https://api.github.com/repos/nknorg/nkn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nknorg/nkn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nknorg/nkn/git/refs{/sha}","trees_url":"https://api.github.com/repos/nknorg/nkn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nknorg/nkn/statuses/{sha}","languages_url":"https://api.github.com/repos/nknorg/nkn/languages","stargazers_url":"https://api.github.com/repos/nknorg/nkn/stargazers","contributors_url":"https://api.github.com/repos/nknorg/nkn/contributors","subscribers_url":"https://api.github.com/repos/nknorg/nkn/subscribers","subscription_url":"https://api.github.com/repos/nknorg/nkn/subscription","commits_url":"https://api.github.com/repos/nknorg/nkn/commits{/sha}","git_commits_url":"https://api.github.com/repos/nknorg/nkn/git/commits{/sha}","comments_url":"https://api.github.com/repos/nknorg/nkn/comments{/number}","issue_comment_url":"https://api.github.com/repos/nknorg/nkn/issues/comments{/number}","contents_url":"https://api.github.com/repos/nknorg/nkn/contents/{+path}","compare_url":"https://api.github.com/repos/nknorg/nkn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nknorg/nkn/merges","archive_url":"https://api.github.com/repos/nknorg/nkn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nknorg/nkn/downloads","issues_url":"https://api.github.com/repos/nknorg/nkn/issues{/number}","pulls_url":"https://api.github.com/repos/nknorg/nkn/pulls{/number}","milestones_url":"https://api.github.com/repos/nknorg/nkn/milestones{/number}","notifications_url":"https://api.github.com/repos/nknorg/nkn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nknorg/nkn/labels{/name}","releases_url":"https://api.github.com/repos/nknorg/nkn/releases{/id}","deployments_url":"https://api.github.com/repos/nknorg/nkn/deployments","created_at":"2018-01-26T12:07:15Z","updated_at":"2018-09-24T07:24:18Z","pushed_at":"2018-09-26T06:10:52Z","git_url":"git://github.com/nknorg/nkn.git","ssh_url":"git@github.com:nknorg/nkn.git","clone_url":"https://github.com/nknorg/nkn.git","svn_url":"https://github.com/nknorg/nkn","homepage":"https://www.nkn.org","size":2988,"stargazers_count":131,"watchers_count":131,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":62,"open_issues":21,"watchers":131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/295"},"html":{"href":"https://github.com/nknorg/nkn/pull/295"},"issue":{"href":"https://api.github.com/repos/nknorg/nkn/issues/295"},"comments":{"href":"https://api.github.com/repos/nknorg/nkn/issues/295/comments"},"review_comments":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/295/comments"},"review_comment":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/295/commits"},"statuses":{"href":"https://api.github.com/repos/nknorg/nkn/statuses/67666aaa5994353355e9f5a8cac07de5e70925a7"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"yilunzhang","id":2791582,"node_id":"MDQ6VXNlcjI3OTE1ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/2791582?v=4","gravatar_id":"","url":"https://api.github.com/users/yilunzhang","html_url":"https://github.com/yilunzhang","followers_url":"https://api.github.com/users/yilunzhang/followers","following_url":"https://api.github.com/users/yilunzhang/following{/other_user}","gists_url":"https://api.github.com/users/yilunzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/yilunzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yilunzhang/subscriptions","organizations_url":"https://api.github.com/users/yilunzhang/orgs","repos_url":"https://api.github.com/users/yilunzhang/repos","events_url":"https://api.github.com/users/yilunzhang/events{/privacy}","received_events_url":"https://api.github.com/users/yilunzhang/received_events","type":"User","site_admin":false},"comments":0,"review_comments":5,"maintainer_can_modify":false,"commits":1,"additions":50,"deletions":72,"changed_files":1}}
{"actor":{"display_login":"yilunzhang"}}