{"action":"created","comment":{"url":"https://api.github.com/repos/datawire/ambassador/pulls/comments/197092078","pull_request_review_id":130765142,"id":197092078,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzA5MjA3OA==","diff_hunk":"@@ -166,16 +206,9 @@ def new_route(self, svc, cluster_name):\n                 route['request_headers_to_add'].append({\"key\": key, \"value\": value})\n \n         cors = self.get('cors')\n-        if cors:\n-            route['cors'] = {key: value for key, value in {\n-                \"allow_origin\": cors['origins'].split(',') if cors['origins'] else None,\n-                \"allow_methods\": cors.get('methods'),\n-                \"allow_headers\": cors.get('headers'),\n-                \"expose_headers\": cors.get('exposed_headers'),\n-                \"allow_credentials\": cors.get('credentials'),\n-                \"max_age\": cors.get('max_age'),\n-                \"enabled\": True\n-            }.items() if value}\n+        if cors is not None:\n+            route['cors'] = dict()\n+            self.generate_route_cors(cors, route['cors'])","path":"ambassador/ambassador/mapping.py","position":63,"original_position":63,"commit_id":"f5ed515c325ccbf1fbb30d772369f9c7102f9710","original_commit_id":"f5ed515c325ccbf1fbb30d772369f9c7102f9710","user":{"login":"containscafeine","id":9133660,"node_id":"MDQ6VXNlcjkxMzM2NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/9133660?v=4","gravatar_id":"","url":"https://api.github.com/users/containscafeine","html_url":"https://github.com/containscafeine","followers_url":"https://api.github.com/users/containscafeine/followers","following_url":"https://api.github.com/users/containscafeine/following{/other_user}","gists_url":"https://api.github.com/users/containscafeine/gists{/gist_id}","starred_url":"https://api.github.com/users/containscafeine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containscafeine/subscriptions","organizations_url":"https://api.github.com/users/containscafeine/orgs","repos_url":"https://api.github.com/users/containscafeine/repos","events_url":"https://api.github.com/users/containscafeine/events{/privacy}","received_events_url":"https://api.github.com/users/containscafeine/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2018-06-21T10:58:03Z","updated_at":"2018-06-21T10:58:03Z","html_url":"https://github.com/datawire/ambassador/pull/529#discussion_r197092078","pull_request_url":"https://api.github.com/repos/datawire/ambassador/pulls/529","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/datawire/ambassador/pulls/comments/197092078"},"html":{"href":"https://github.com/datawire/ambassador/pull/529#discussion_r197092078"},"pull_request":{"href":"https://api.github.com/repos/datawire/ambassador/pulls/529"}},"in_reply_to_id":197008628},"pull_request":{"url":"https://api.github.com/repos/datawire/ambassador/pulls/529","id":195155448,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MTU1NDQ4","html_url":"https://github.com/datawire/ambassador/pull/529","diff_url":"https://github.com/datawire/ambassador/pull/529.diff","patch_url":"https://github.com/datawire/ambassador/pull/529.patch","issue_url":"https://api.github.com/repos/datawire/ambassador/issues/529","number":529,"state":"open","locked":false,"title":"Move YAML strings to YAML arrays for CORS configuration","user":{"login":"containscafeine","id":9133660,"node_id":"MDQ6VXNlcjkxMzM2NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/9133660?v=4","gravatar_id":"","url":"https://api.github.com/users/containscafeine","html_url":"https://github.com/containscafeine","followers_url":"https://api.github.com/users/containscafeine/followers","following_url":"https://api.github.com/users/containscafeine/following{/other_user}","gists_url":"https://api.github.com/users/containscafeine/gists{/gist_id}","starred_url":"https://api.github.com/users/containscafeine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containscafeine/subscriptions","organizations_url":"https://api.github.com/users/containscafeine/orgs","repos_url":"https://api.github.com/users/containscafeine/repos","events_url":"https://api.github.com/users/containscafeine/events{/privacy}","received_events_url":"https://api.github.com/users/containscafeine/received_events","type":"User","site_admin":false},"body":"This commit makes defining CORS configuration in ambassador more\nreadable by moving comma separated strings, which envoy supports,\nto YAML arrays.\n\nThe previous format looks like -\n```yaml\ncors:\n  origins: http://foo.example,http://bar.example\n  methods: POST, GET, OPTIONS\n  headers: Content-Type,Accept,Authorization\n  credentials: true\n  exposed_headers: X-Custom-Header\n  max_age: \"86400\"\n```\n\nThe new format looks like -\n```yaml\ncors:\n  origins:\n  - http://foo.example\n  - http://bar.example\n  methods:\n  - POST\n  - GET\n  - OPTIONS\n  headers:\n  - Content-Type\n  - Accept\n  - Authorization\n  credentials: true\n  exposed_headers:\n  - X-Custom-Header\n  max_age: \"86400\"\n```\n\nFix #466","created_at":"2018-06-15T12:07:19Z","updated_at":"2018-06-21T10:58:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd695240aaaa75ee1871f83089ad29eca93b3267","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/datawire/ambassador/pulls/529/commits","review_comments_url":"https://api.github.com/repos/datawire/ambassador/pulls/529/comments","review_comment_url":"https://api.github.com/repos/datawire/ambassador/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datawire/ambassador/issues/529/comments","statuses_url":"https://api.github.com/repos/datawire/ambassador/statuses/f5ed515c325ccbf1fbb30d772369f9c7102f9710","head":{"label":"datawire:concaf/fix/cors-yaml-array","ref":"concaf/fix/cors-yaml-array","sha":"f5ed515c325ccbf1fbb30d772369f9c7102f9710","user":{"login":"datawire","id":9270257,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzAyNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/9270257?v=4","gravatar_id":"","url":"https://api.github.com/users/datawire","html_url":"https://github.com/datawire","followers_url":"https://api.github.com/users/datawire/followers","following_url":"https://api.github.com/users/datawire/following{/other_user}","gists_url":"https://api.github.com/users/datawire/gists{/gist_id}","starred_url":"https://api.github.com/users/datawire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datawire/subscriptions","organizations_url":"https://api.github.com/users/datawire/orgs","repos_url":"https://api.github.com/users/datawire/repos","events_url":"https://api.github.com/users/datawire/events{/privacy}","received_events_url":"https://api.github.com/users/datawire/received_events","type":"Organization","site_admin":false},"repo":{"id":86740149,"node_id":"MDEwOlJlcG9zaXRvcnk4Njc0MDE0OQ==","name":"ambassador","full_name":"datawire/ambassador","owner":{"login":"datawire","id":9270257,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzAyNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/9270257?v=4","gravatar_id":"","url":"https://api.github.com/users/datawire","html_url":"https://github.com/datawire","followers_url":"https://api.github.com/users/datawire/followers","following_url":"https://api.github.com/users/datawire/following{/other_user}","gists_url":"https://api.github.com/users/datawire/gists{/gist_id}","starred_url":"https://api.github.com/users/datawire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datawire/subscriptions","organizations_url":"https://api.github.com/users/datawire/orgs","repos_url":"https://api.github.com/users/datawire/repos","events_url":"https://api.github.com/users/datawire/events{/privacy}","received_events_url":"https://api.github.com/users/datawire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datawire/ambassador","description":"open source Kubernetes-native API gateway for microservices built on the Envoy Proxy","fork":false,"url":"https://api.github.com/repos/datawire/ambassador","forks_url":"https://api.github.com/repos/datawire/ambassador/forks","keys_url":"https://api.github.com/repos/datawire/ambassador/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datawire/ambassador/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datawire/ambassador/teams","hooks_url":"https://api.github.com/repos/datawire/ambassador/hooks","issue_events_url":"https://api.github.com/repos/datawire/ambassador/issues/events{/number}","events_url":"https://api.github.com/repos/datawire/ambassador/events","assignees_url":"https://api.github.com/repos/datawire/ambassador/assignees{/user}","branches_url":"https://api.github.com/repos/datawire/ambassador/branches{/branch}","tags_url":"https://api.github.com/repos/datawire/ambassador/tags","blobs_url":"https://api.github.com/repos/datawire/ambassador/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datawire/ambassador/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datawire/ambassador/git/refs{/sha}","trees_url":"https://api.github.com/repos/datawire/ambassador/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datawire/ambassador/statuses/{sha}","languages_url":"https://api.github.com/repos/datawire/ambassador/languages","stargazers_url":"https://api.github.com/repos/datawire/ambassador/stargazers","contributors_url":"https://api.github.com/repos/datawire/ambassador/contributors","subscribers_url":"https://api.github.com/repos/datawire/ambassador/subscribers","subscription_url":"https://api.github.com/repos/datawire/ambassador/subscription","commits_url":"https://api.github.com/repos/datawire/ambassador/commits{/sha}","git_commits_url":"https://api.github.com/repos/datawire/ambassador/git/commits{/sha}","comments_url":"https://api.github.com/repos/datawire/ambassador/comments{/number}","issue_comment_url":"https://api.github.com/repos/datawire/ambassador/issues/comments{/number}","contents_url":"https://api.github.com/repos/datawire/ambassador/contents/{+path}","compare_url":"https://api.github.com/repos/datawire/ambassador/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datawire/ambassador/merges","archive_url":"https://api.github.com/repos/datawire/ambassador/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datawire/ambassador/downloads","issues_url":"https://api.github.com/repos/datawire/ambassador/issues{/number}","pulls_url":"https://api.github.com/repos/datawire/ambassador/pulls{/number}","milestones_url":"https://api.github.com/repos/datawire/ambassador/milestones{/number}","notifications_url":"https://api.github.com/repos/datawire/ambassador/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datawire/ambassador/labels{/name}","releases_url":"https://api.github.com/repos/datawire/ambassador/releases{/id}","deployments_url":"https://api.github.com/repos/datawire/ambassador/deployments","created_at":"2017-03-30T19:22:52Z","updated_at":"2018-06-21T09:41:22Z","pushed_at":"2018-06-20T18:57:14Z","git_url":"git://github.com/datawire/ambassador.git","ssh_url":"git@github.com:datawire/ambassador.git","clone_url":"https://github.com/datawire/ambassador.git","svn_url":"https://github.com/datawire/ambassador","homepage":"https://www.getambassador.io","size":3777,"stargazers_count":754,"watchers_count":754,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":96,"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":79,"open_issues":96,"watchers":754,"default_branch":"master"}},"base":{"label":"datawire:master","ref":"master","sha":"cf84b318a85d737f5d0aef1ade4f4f940fdedbd3","user":{"login":"datawire","id":9270257,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzAyNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/9270257?v=4","gravatar_id":"","url":"https://api.github.com/users/datawire","html_url":"https://github.com/datawire","followers_url":"https://api.github.com/users/datawire/followers","following_url":"https://api.github.com/users/datawire/following{/other_user}","gists_url":"https://api.github.com/users/datawire/gists{/gist_id}","starred_url":"https://api.github.com/users/datawire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datawire/subscriptions","organizations_url":"https://api.github.com/users/datawire/orgs","repos_url":"https://api.github.com/users/datawire/repos","events_url":"https://api.github.com/users/datawire/events{/privacy}","received_events_url":"https://api.github.com/users/datawire/received_events","type":"Organization","site_admin":false},"repo":{"id":86740149,"node_id":"MDEwOlJlcG9zaXRvcnk4Njc0MDE0OQ==","name":"ambassador","full_name":"datawire/ambassador","owner":{"login":"datawire","id":9270257,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzAyNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/9270257?v=4","gravatar_id":"","url":"https://api.github.com/users/datawire","html_url":"https://github.com/datawire","followers_url":"https://api.github.com/users/datawire/followers","following_url":"https://api.github.com/users/datawire/following{/other_user}","gists_url":"https://api.github.com/users/datawire/gists{/gist_id}","starred_url":"https://api.github.com/users/datawire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datawire/subscriptions","organizations_url":"https://api.github.com/users/datawire/orgs","repos_url":"https://api.github.com/users/datawire/repos","events_url":"https://api.github.com/users/datawire/events{/privacy}","received_events_url":"https://api.github.com/users/datawire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datawire/ambassador","description":"open source Kubernetes-native API gateway for microservices built on the Envoy Proxy","fork":false,"url":"https://api.github.com/repos/datawire/ambassador","forks_url":"https://api.github.com/repos/datawire/ambassador/forks","keys_url":"https://api.github.com/repos/datawire/ambassador/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datawire/ambassador/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datawire/ambassador/teams","hooks_url":"https://api.github.com/repos/datawire/ambassador/hooks","issue_events_url":"https://api.github.com/repos/datawire/ambassador/issues/events{/number}","events_url":"https://api.github.com/repos/datawire/ambassador/events","assignees_url":"https://api.github.com/repos/datawire/ambassador/assignees{/user}","branches_url":"https://api.github.com/repos/datawire/ambassador/branches{/branch}","tags_url":"https://api.github.com/repos/datawire/ambassador/tags","blobs_url":"https://api.github.com/repos/datawire/ambassador/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datawire/ambassador/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datawire/ambassador/git/refs{/sha}","trees_url":"https://api.github.com/repos/datawire/ambassador/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datawire/ambassador/statuses/{sha}","languages_url":"https://api.github.com/repos/datawire/ambassador/languages","stargazers_url":"https://api.github.com/repos/datawire/ambassador/stargazers","contributors_url":"https://api.github.com/repos/datawire/ambassador/contributors","subscribers_url":"https://api.github.com/repos/datawire/ambassador/subscribers","subscription_url":"https://api.github.com/repos/datawire/ambassador/subscription","commits_url":"https://api.github.com/repos/datawire/ambassador/commits{/sha}","git_commits_url":"https://api.github.com/repos/datawire/ambassador/git/commits{/sha}","comments_url":"https://api.github.com/repos/datawire/ambassador/comments{/number}","issue_comment_url":"https://api.github.com/repos/datawire/ambassador/issues/comments{/number}","contents_url":"https://api.github.com/repos/datawire/ambassador/contents/{+path}","compare_url":"https://api.github.com/repos/datawire/ambassador/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datawire/ambassador/merges","archive_url":"https://api.github.com/repos/datawire/ambassador/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datawire/ambassador/downloads","issues_url":"https://api.github.com/repos/datawire/ambassador/issues{/number}","pulls_url":"https://api.github.com/repos/datawire/ambassador/pulls{/number}","milestones_url":"https://api.github.com/repos/datawire/ambassador/milestones{/number}","notifications_url":"https://api.github.com/repos/datawire/ambassador/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datawire/ambassador/labels{/name}","releases_url":"https://api.github.com/repos/datawire/ambassador/releases{/id}","deployments_url":"https://api.github.com/repos/datawire/ambassador/deployments","created_at":"2017-03-30T19:22:52Z","updated_at":"2018-06-21T09:41:22Z","pushed_at":"2018-06-20T18:57:14Z","git_url":"git://github.com/datawire/ambassador.git","ssh_url":"git@github.com:datawire/ambassador.git","clone_url":"https://github.com/datawire/ambassador.git","svn_url":"https://github.com/datawire/ambassador","homepage":"https://www.getambassador.io","size":3777,"stargazers_count":754,"watchers_count":754,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":96,"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":79,"open_issues":96,"watchers":754,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datawire/ambassador/pulls/529"},"html":{"href":"https://github.com/datawire/ambassador/pull/529"},"issue":{"href":"https://api.github.com/repos/datawire/ambassador/issues/529"},"comments":{"href":"https://api.github.com/repos/datawire/ambassador/issues/529/comments"},"review_comments":{"href":"https://api.github.com/repos/datawire/ambassador/pulls/529/comments"},"review_comment":{"href":"https://api.github.com/repos/datawire/ambassador/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datawire/ambassador/pulls/529/commits"},"statuses":{"href":"https://api.github.com/repos/datawire/ambassador/statuses/f5ed515c325ccbf1fbb30d772369f9c7102f9710"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"containscafeine"}}