payload: {"action":"created","comment":{"url":"https://api.github.com/repos/playdots/underpants/pulls/comments/267118450","pull_request_review_id":216445819,"id":267118450,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2NzExODQ1MA==","diff_hunk":"@@ -76,6 +76,11 @@ func (b *Backend) serveHTTPProxy(w http.ResponseWriter, r *http.Request) {\n \t\tzap.String(\"method\", r.Method),\n \t}\n \n+\t// for admin dashboard xhr requests\n+\tw.Header().Add(\"Access-Control-Allow-Origin\", b.Route.To)\n+\tw.Header().Add(\"Access-Control-Allow-Headers\", \"*\")\n+\tw.Header().Set(\"Access-Control-Allow-Credentials\", \"true\")","path":"proxy/backend.go","position":null,"original_position":7,"commit_id":"5abfb0ae7edb2e21bd79795371863845350ce25c","original_commit_id":"9d56241f53b6169934c4f64cf46280a4a3995323","user":{"login":"osetinsky","id":1250151,"node_id":"MDQ6VXNlcjEyNTAxNTE=","avatar_url":"https://avatars2.githubusercontent.com/u/1250151?v=4","gravatar_id":"","url":"https://api.github.com/users/osetinsky","html_url":"https://github.com/osetinsky","followers_url":"https://api.github.com/users/osetinsky/followers","following_url":"https://api.github.com/users/osetinsky/following{/other_user}","gists_url":"https://api.github.com/users/osetinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/osetinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osetinsky/subscriptions","organizations_url":"https://api.github.com/users/osetinsky/orgs","repos_url":"https://api.github.com/users/osetinsky/repos","events_url":"https://api.github.com/users/osetinsky/events{/privacy}","received_events_url":"https://api.github.com/users/osetinsky/received_events","type":"User","site_admin":false},"body":"Since we're only setting access control headers for campaigns/campaigns-web, I think I'm going to leave for now and we can move to config if other admin services need it","created_at":"2019-03-19T22:10:26Z","updated_at":"2019-03-19T22:10:26Z","html_url":"https://github.com/playdots/underpants/pull/9#discussion_r267118450","pull_request_url":"https://api.github.com/repos/playdots/underpants/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/playdots/underpants/pulls/comments/267118450"},"html":{"href":"https://github.com/playdots/underpants/pull/9#discussion_r267118450"},"pull_request":{"href":"https://api.github.com/repos/playdots/underpants/pulls/9"}},"in_reply_to_id":266536247},"pull_request":{"url":"https://api.github.com/repos/playdots/underpants/pulls/9","id":260557587,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYwNTU3NTg3","html_url":"https://github.com/playdots/underpants/pull/9","diff_url":"https://github.com/playdots/underpants/pull/9.diff","patch_url":"https://github.com/playdots/underpants/pull/9.patch","issue_url":"https://api.github.com/repos/playdots/underpants/issues/9","number":9,"state":"open","locked":false,"title":"add custom headers to requests, allow cross-subdomain cookies","user":{"login":"osetinsky","id":1250151,"node_id":"MDQ6VXNlcjEyNTAxNTE=","avatar_url":"https://avatars2.githubusercontent.com/u/1250151?v=4","gravatar_id":"","url":"https://api.github.com/users/osetinsky","html_url":"https://github.com/osetinsky","followers_url":"https://api.github.com/users/osetinsky/followers","following_url":"https://api.github.com/users/osetinsky/following{/other_user}","gists_url":"https://api.github.com/users/osetinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/osetinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osetinsky/subscriptions","organizations_url":"https://api.github.com/users/osetinsky/orgs","repos_url":"https://api.github.com/users/osetinsky/repos","events_url":"https://api.github.com/users/osetinsky/events{/privacy}","received_events_url":"https://api.github.com/users/osetinsky/received_events","type":"User","site_admin":false},"body":"We may want to let the proxy add headers to requests that weren't added to the requests by the originating source. For example, one may want to add auth tokens to requests sent from admin dashboards, without exposing those tokens in the client code.\r\n\r\nAlso see: https://github.com/playdots/underpants-eb/pull/22\r\n\r\nEdit: to make JS requests across subdomains, we need to modify cookies returned from auth proxy to exclude subdomains for allowed origins and only include the naked domain. \r\n\r\nSee underpants-eb modified underpants.json which includes a new `share-cookie-across-subdomains` field for certain domains that we want to share cross-subdomain cookies with clients that make requests to them. For example, campaigns.dotshq.com will share cross-subdomain cookies with campaigns-web.dotshq.com, and campaigns.dotshq.com has campaigns-web listed as an allowed origin.","created_at":"2019-03-12T22:18:51Z","updated_at":"2019-03-19T22:10:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8951a4cfcb221d89806d75709ed6a635ea9a2083","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/playdots/underpants/pulls/9/commits","review_comments_url":"https://api.github.com/repos/playdots/underpants/pulls/9/comments","review_comment_url":"https://api.github.com/repos/playdots/underpants/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playdots/underpants/issues/9/comments","statuses_url":"https://api.github.com/repos/playdots/underpants/statuses/5abfb0ae7edb2e21bd79795371863845350ce25c","head":{"label":"playdots:to-add-headers","ref":"to-add-headers","sha":"5abfb0ae7edb2e21bd79795371863845350ce25c","user":{"login":"playdots","id":8516509,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MTY1MDk=","avatar_url":"https://avatars0.githubusercontent.com/u/8516509?v=4","gravatar_id":"","url":"https://api.github.com/users/playdots","html_url":"https://github.com/playdots","followers_url":"https://api.github.com/users/playdots/followers","following_url":"https://api.github.com/users/playdots/following{/other_user}","gists_url":"https://api.github.com/users/playdots/gists{/gist_id}","starred_url":"https://api.github.com/users/playdots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playdots/subscriptions","organizations_url":"https://api.github.com/users/playdots/orgs","repos_url":"https://api.github.com/users/playdots/repos","events_url":"https://api.github.com/users/playdots/events{/privacy}","received_events_url":"https://api.github.com/users/playdots/received_events","type":"Organization","site_admin":false},"repo":{"id":123472478,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM0NzI0Nzg=","name":"underpants","full_name":"playdots/underpants","private":false,"owner":{"login":"playdots","id":8516509,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MTY1MDk=","avatar_url":"https://avatars0.githubusercontent.com/u/8516509?v=4","gravatar_id":"","url":"https://api.github.com/users/playdots","html_url":"https://github.com/playdots","followers_url":"https://api.github.com/users/playdots/followers","following_url":"https://api.github.com/users/playdots/following{/other_user}","gists_url":"https://api.github.com/users/playdots/gists{/gist_id}","starred_url":"https://api.github.com/users/playdots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playdots/subscriptions","organizations_url":"https://api.github.com/users/playdots/orgs","repos_url":"https://api.github.com/users/playdots/repos","events_url":"https://api.github.com/users/playdots/events{/privacy}","received_events_url":"https://api.github.com/users/playdots/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/playdots/underpants","description":"Reverse Proxy w/ OAuth2 - it covers its backends","fork":true,"url":"https://api.github.com/repos/playdots/underpants","forks_url":"https://api.github.com/repos/playdots/underpants/forks","keys_url":"https://api.github.com/repos/playdots/underpants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playdots/underpants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playdots/underpants/teams","hooks_url":"https://api.github.com/repos/playdots/underpants/hooks","issue_events_url":"https://api.github.com/repos/playdots/underpants/issues/events{/number}","events_url":"https://api.github.com/repos/playdots/underpants/events","assignees_url":"https://api.github.com/repos/playdots/underpants/assignees{/user}","branches_url":"https://api.github.com/repos/playdots/underpants/branches{/branch}","tags_url":"https://api.github.com/repos/playdots/underpants/tags","blobs_url":"https://api.github.com/repos/playdots/underpants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playdots/underpants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playdots/underpants/git/refs{/sha}","trees_url":"https://api.github.com/repos/playdots/underpants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playdots/underpants/statuses/{sha}","languages_url":"https://api.github.com/repos/playdots/underpants/languages","stargazers_url":"https://api.github.com/repos/playdots/underpants/stargazers","contributors_url":"https://api.github.com/repos/playdots/underpants/contributors","subscribers_url":"https://api.github.com/repos/playdots/underpants/subscribers","subscription_url":"https://api.github.com/repos/playdots/underpants/subscription","commits_url":"https://api.github.com/repos/playdots/underpants/commits{/sha}","git_commits_url":"https://api.github.com/repos/playdots/underpants/git/commits{/sha}","comments_url":"https://api.github.com/repos/playdots/underpants/comments{/number}","issue_comment_url":"https://api.github.com/repos/playdots/underpants/issues/comments{/number}","contents_url":"https://api.github.com/repos/playdots/underpants/contents/{+path}","compare_url":"https://api.github.com/repos/playdots/underpants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playdots/underpants/merges","archive_url":"https://api.github.com/repos/playdots/underpants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playdots/underpants/downloads","issues_url":"https://api.github.com/repos/playdots/underpants/issues{/number}","pulls_url":"https://api.github.com/repos/playdots/underpants/pulls{/number}","milestones_url":"https://api.github.com/repos/playdots/underpants/milestones{/number}","notifications_url":"https://api.github.com/repos/playdots/underpants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playdots/underpants/labels{/name}","releases_url":"https://api.github.com/repos/playdots/underpants/releases{/id}","deployments_url":"https://api.github.com/repos/playdots/underpants/deployments","created_at":"2018-03-01T17:58:15Z","updated_at":"2018-07-31T21:42:07Z","pushed_at":"2019-03-19T22:05:40Z","git_url":"git://github.com/playdots/underpants.git","ssh_url":"git@github.com:playdots/underpants.git","clone_url":"https://github.com/playdots/underpants.git","svn_url":"https://github.com/playdots/underpants","homepage":"","size":5289,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"playdots:master","ref":"master","sha":"9d093bb60c9c095e82e87a4891ea6a832ab92a55","user":{"login":"playdots","id":8516509,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MTY1MDk=","avatar_url":"https://avatars0.githubusercontent.com/u/8516509?v=4","gravatar_id":"","url":"https://api.github.com/users/playdots","html_url":"https://github.com/playdots","followers_url":"https://api.github.com/users/playdots/followers","following_url":"https://api.github.com/users/playdots/following{/other_user}","gists_url":"https://api.github.com/users/playdots/gists{/gist_id}","starred_url":"https://api.github.com/users/playdots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playdots/subscriptions","organizations_url":"https://api.github.com/users/playdots/orgs","repos_url":"https://api.github.com/users/playdots/repos","events_url":"https://api.github.com/users/playdots/events{/privacy}","received_events_url":"https://api.github.com/users/playdots/received_events","type":"Organization","site_admin":false},"repo":{"id":123472478,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM0NzI0Nzg=","name":"underpants","full_name":"playdots/underpants","private":false,"owner":{"login":"playdots","id":8516509,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MTY1MDk=","avatar_url":"https://avatars0.githubusercontent.com/u/8516509?v=4","gravatar_id":"","url":"https://api.github.com/users/playdots","html_url":"https://github.com/playdots","followers_url":"https://api.github.com/users/playdots/followers","following_url":"https://api.github.com/users/playdots/following{/other_user}","gists_url":"https://api.github.com/users/playdots/gists{/gist_id}","starred_url":"https://api.github.com/users/playdots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playdots/subscriptions","organizations_url":"https://api.github.com/users/playdots/orgs","repos_url":"https://api.github.com/users/playdots/repos","events_url":"https://api.github.com/users/playdots/events{/privacy}","received_events_url":"https://api.github.com/users/playdots/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/playdots/underpants","description":"Reverse Proxy w/ OAuth2 - it covers its backends","fork":true,"url":"https://api.github.com/repos/playdots/underpants","forks_url":"https://api.github.com/repos/playdots/underpants/forks","keys_url":"https://api.github.com/repos/playdots/underpants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playdots/underpants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playdots/underpants/teams","hooks_url":"https://api.github.com/repos/playdots/underpants/hooks","issue_events_url":"https://api.github.com/repos/playdots/underpants/issues/events{/number}","events_url":"https://api.github.com/repos/playdots/underpants/events","assignees_url":"https://api.github.com/repos/playdots/underpants/assignees{/user}","branches_url":"https://api.github.com/repos/playdots/underpants/branches{/branch}","tags_url":"https://api.github.com/repos/playdots/underpants/tags","blobs_url":"https://api.github.com/repos/playdots/underpants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playdots/underpants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playdots/underpants/git/refs{/sha}","trees_url":"https://api.github.com/repos/playdots/underpants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playdots/underpants/statuses/{sha}","languages_url":"https://api.github.com/repos/playdots/underpants/languages","stargazers_url":"https://api.github.com/repos/playdots/underpants/stargazers","contributors_url":"https://api.github.com/repos/playdots/underpants/contributors","subscribers_url":"https://api.github.com/repos/playdots/underpants/subscribers","subscription_url":"https://api.github.com/repos/playdots/underpants/subscription","commits_url":"https://api.github.com/repos/playdots/underpants/commits{/sha}","git_commits_url":"https://api.github.com/repos/playdots/underpants/git/commits{/sha}","comments_url":"https://api.github.com/repos/playdots/underpants/comments{/number}","issue_comment_url":"https://api.github.com/repos/playdots/underpants/issues/comments{/number}","contents_url":"https://api.github.com/repos/playdots/underpants/contents/{+path}","compare_url":"https://api.github.com/repos/playdots/underpants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playdots/underpants/merges","archive_url":"https://api.github.com/repos/playdots/underpants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playdots/underpants/downloads","issues_url":"https://api.github.com/repos/playdots/underpants/issues{/number}","pulls_url":"https://api.github.com/repos/playdots/underpants/pulls{/number}","milestones_url":"https://api.github.com/repos/playdots/underpants/milestones{/number}","notifications_url":"https://api.github.com/repos/playdots/underpants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playdots/underpants/labels{/name}","releases_url":"https://api.github.com/repos/playdots/underpants/releases{/id}","deployments_url":"https://api.github.com/repos/playdots/underpants/deployments","created_at":"2018-03-01T17:58:15Z","updated_at":"2018-07-31T21:42:07Z","pushed_at":"2019-03-19T22:05:40Z","git_url":"git://github.com/playdots/underpants.git","ssh_url":"git@github.com:playdots/underpants.git","clone_url":"https://github.com/playdots/underpants.git","svn_url":"https://github.com/playdots/underpants","homepage":"","size":5289,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playdots/underpants/pulls/9"},"html":{"href":"https://github.com/playdots/underpants/pull/9"},"issue":{"href":"https://api.github.com/repos/playdots/underpants/issues/9"},"comments":{"href":"https://api.github.com/repos/playdots/underpants/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/playdots/underpants/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/playdots/underpants/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playdots/underpants/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/playdots/underpants/statuses/5abfb0ae7edb2e21bd79795371863845350ce25c"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"osetinsky"}}