{"action":"created","comment":{"url":"https://api.github.com/repos/gaul/s3proxy/pulls/comments/233616498","pull_request_review_id":175072181,"id":233616498,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzYxNjQ5OA==","diff_hunk":"@@ -280,13 +280,31 @@ private static String createCanonicalRequest(HttpServletRequest request,\n             signedHeaders = Splitter.on(';').splitToList(request.getParameter(\n                     \"X-Amz-SignedHeaders\"));\n         }\n+\n+        /*\n+        CORS Preflight","path":"src/main/java/org/gaul/s3proxy/AwsSignature.java","position":6,"original_position":6,"commit_id":"e5d5f5e94cc453f4d9bf1f2c74246f505deabdf8","original_commit_id":"e5d5f5e94cc453f4d9bf1f2c74246f505deabdf8","user":{"login":"gaul","id":848247,"node_id":"MDQ6VXNlcjg0ODI0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/848247?v=4","gravatar_id":"","url":"https://api.github.com/users/gaul","html_url":"https://github.com/gaul","followers_url":"https://api.github.com/users/gaul/followers","following_url":"https://api.github.com/users/gaul/following{/other_user}","gists_url":"https://api.github.com/users/gaul/gists{/gist_id}","starred_url":"https://api.github.com/users/gaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaul/subscriptions","organizations_url":"https://api.github.com/users/gaul/orgs","repos_url":"https://api.github.com/users/gaul/repos","events_url":"https://api.github.com/users/gaul/events{/privacy}","received_events_url":"https://api.github.com/users/gaul/received_events","type":"User","site_admin":false},"body":"Could you make this a block comment with either:\r\n\r\n```\r\n/*\r\n *\r\n */\r\n\r\n```\r\n\r\nor \r\n\r\n```\r\n//\r\n//\r\n//\r\n```","created_at":"2018-11-14T20:56:38Z","updated_at":"2018-11-14T20:57:25Z","html_url":"https://github.com/gaul/s3proxy/pull/287#discussion_r233616498","pull_request_url":"https://api.github.com/repos/gaul/s3proxy/pulls/287","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/gaul/s3proxy/pulls/comments/233616498"},"html":{"href":"https://github.com/gaul/s3proxy/pull/287#discussion_r233616498"},"pull_request":{"href":"https://api.github.com/repos/gaul/s3proxy/pulls/287"}}},"pull_request":{"url":"https://api.github.com/repos/gaul/s3proxy/pulls/287","id":230857178,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwODU3MTc4","html_url":"https://github.com/gaul/s3proxy/pull/287","diff_url":"https://github.com/gaul/s3proxy/pull/287.diff","patch_url":"https://github.com/gaul/s3proxy/pull/287.patch","issue_url":"https://api.github.com/repos/gaul/s3proxy/issues/287","number":287,"state":"open","locked":false,"title":"Basic CORS support ","user":{"login":"reimannf","id":10754110,"node_id":"MDQ6VXNlcjEwNzU0MTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10754110?v=4","gravatar_id":"","url":"https://api.github.com/users/reimannf","html_url":"https://github.com/reimannf","followers_url":"https://api.github.com/users/reimannf/followers","following_url":"https://api.github.com/users/reimannf/following{/other_user}","gists_url":"https://api.github.com/users/reimannf/gists{/gist_id}","starred_url":"https://api.github.com/users/reimannf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reimannf/subscriptions","organizations_url":"https://api.github.com/users/reimannf/orgs","repos_url":"https://api.github.com/users/reimannf/repos","events_url":"https://api.github.com/users/reimannf/events{/privacy}","received_events_url":"https://api.github.com/users/reimannf/received_events","type":"User","site_admin":false},"body":"This PR brings the basic capability for `s3proxy` to respond to CORS preflight requests.\r\n\r\n* S3ProxyHandler for HTTP method `OPTIONS`\r\n* `OPTIONS` response include `Access-Control-Allow-Origin`, `Access-Control-Allow-Methods` and `Access-Control-Allow-Headers` Headers\r\n* Rewrite `method` in signature generation for `OPTIONS` requests\r\n* Configurability for allowed Origins, Methods and Headers for CORS Preflight requests\r\n* Adding `Access-Control-Allow-Origin` header in CORS actual requests for GET, POST and PUT method based on provided `Origin` header\r\n* `S3PROXY_CORS_ALLOW_ALL` allows every Origin and Header and Methods `GET, PUT, POST`\r\n\r\nAllowed CORS settings with regex for Origins looks like:\r\n```\r\ndocker run --publish 8888:80 \\\r\n   -e S3PROXY_... \\\r\n   -e S3PROXY_CORS_ALLOW_ORIGINS=\"https://.+\\.example\\.com https://.+\\.example\\.cloud http://localhost:.+\" \\\r\n   -e S3PROXY_CORS_ALLOW_METHODS=\"GET PUT\" \\\r\n   -e S3PROXY_CORS_ALLOW_HEADERS=\"Content-Type Accept\" \\\r\n   -e JCLOUDS_... \\\r\n   --name s3proxy gaul/s3proxy:latest\r\n```\r\n\r\nThis does not add support for S3 CORS bucket operations as such.\r\n\r\nfixes #142 ","created_at":"2018-11-14T14:35:10Z","updated_at":"2018-11-14T20:57:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68bf32149b818a0377e36ca7e21a476566e1b6c3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gaul/s3proxy/pulls/287/commits","review_comments_url":"https://api.github.com/repos/gaul/s3proxy/pulls/287/comments","review_comment_url":"https://api.github.com/repos/gaul/s3proxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gaul/s3proxy/issues/287/comments","statuses_url":"https://api.github.com/repos/gaul/s3proxy/statuses/e5d5f5e94cc453f4d9bf1f2c74246f505deabdf8","head":{"label":"reimannf:cors","ref":"cors","sha":"e5d5f5e94cc453f4d9bf1f2c74246f505deabdf8","user":{"login":"reimannf","id":10754110,"node_id":"MDQ6VXNlcjEwNzU0MTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10754110?v=4","gravatar_id":"","url":"https://api.github.com/users/reimannf","html_url":"https://github.com/reimannf","followers_url":"https://api.github.com/users/reimannf/followers","following_url":"https://api.github.com/users/reimannf/following{/other_user}","gists_url":"https://api.github.com/users/reimannf/gists{/gist_id}","starred_url":"https://api.github.com/users/reimannf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reimannf/subscriptions","organizations_url":"https://api.github.com/users/reimannf/orgs","repos_url":"https://api.github.com/users/reimannf/repos","events_url":"https://api.github.com/users/reimannf/events{/privacy}","received_events_url":"https://api.github.com/users/reimannf/received_events","type":"User","site_admin":false},"repo":{"id":154623470,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ2MjM0NzA=","name":"s3proxy","full_name":"reimannf/s3proxy","private":false,"owner":{"login":"reimannf","id":10754110,"node_id":"MDQ6VXNlcjEwNzU0MTEw","avatar_url":"https://avatars2.githubusercontent.com/u/10754110?v=4","gravatar_id":"","url":"https://api.github.com/users/reimannf","html_url":"https://github.com/reimannf","followers_url":"https://api.github.com/users/reimannf/followers","following_url":"https://api.github.com/users/reimannf/following{/other_user}","gists_url":"https://api.github.com/users/reimannf/gists{/gist_id}","starred_url":"https://api.github.com/users/reimannf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reimannf/subscriptions","organizations_url":"https://api.github.com/users/reimannf/orgs","repos_url":"https://api.github.com/users/reimannf/repos","events_url":"https://api.github.com/users/reimannf/events{/privacy}","received_events_url":"https://api.github.com/users/reimannf/received_events","type":"User","site_admin":false},"html_url":"https://github.com/reimannf/s3proxy","description":"Access other storage backends via the S3 API","fork":true,"url":"https://api.github.com/repos/reimannf/s3proxy","forks_url":"https://api.github.com/repos/reimannf/s3proxy/forks","keys_url":"https://api.github.com/repos/reimannf/s3proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reimannf/s3proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reimannf/s3proxy/teams","hooks_url":"https://api.github.com/repos/reimannf/s3proxy/hooks","issue_events_url":"https://api.github.com/repos/reimannf/s3proxy/issues/events{/number}","events_url":"https://api.github.com/repos/reimannf/s3proxy/events","assignees_url":"https://api.github.com/repos/reimannf/s3proxy/assignees{/user}","branches_url":"https://api.github.com/repos/reimannf/s3proxy/branches{/branch}","tags_url":"https://api.github.com/repos/reimannf/s3proxy/tags","blobs_url":"https://api.github.com/repos/reimannf/s3proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reimannf/s3proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reimannf/s3proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/reimannf/s3proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reimannf/s3proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/reimannf/s3proxy/languages","stargazers_url":"https://api.github.com/repos/reimannf/s3proxy/stargazers","contributors_url":"https://api.github.com/repos/reimannf/s3proxy/contributors","subscribers_url":"https://api.github.com/repos/reimannf/s3proxy/subscribers","subscription_url":"https://api.github.com/repos/reimannf/s3proxy/subscription","commits_url":"https://api.github.com/repos/reimannf/s3proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/reimannf/s3proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/reimannf/s3proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/reimannf/s3proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/reimannf/s3proxy/contents/{+path}","compare_url":"https://api.github.com/repos/reimannf/s3proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reimannf/s3proxy/merges","archive_url":"https://api.github.com/repos/reimannf/s3proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reimannf/s3proxy/downloads","issues_url":"https://api.github.com/repos/reimannf/s3proxy/issues{/number}","pulls_url":"https://api.github.com/repos/reimannf/s3proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/reimannf/s3proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/reimannf/s3proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reimannf/s3proxy/labels{/name}","releases_url":"https://api.github.com/repos/reimannf/s3proxy/releases{/id}","deployments_url":"https://api.github.com/repos/reimannf/s3proxy/deployments","created_at":"2018-10-25T06:50:15Z","updated_at":"2018-11-14T14:08:24Z","pushed_at":"2018-11-14T18:46:40Z","git_url":"git://github.com/reimannf/s3proxy.git","ssh_url":"git@github.com:reimannf/s3proxy.git","clone_url":"https://github.com/reimannf/s3proxy.git","svn_url":"https://github.com/reimannf/s3proxy","homepage":"","size":1421,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"gaul:master","ref":"master","sha":"e7070762b43a4f6d52fbb65661c6d3b4757df4c5","user":{"login":"gaul","id":848247,"node_id":"MDQ6VXNlcjg0ODI0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/848247?v=4","gravatar_id":"","url":"https://api.github.com/users/gaul","html_url":"https://github.com/gaul","followers_url":"https://api.github.com/users/gaul/followers","following_url":"https://api.github.com/users/gaul/following{/other_user}","gists_url":"https://api.github.com/users/gaul/gists{/gist_id}","starred_url":"https://api.github.com/users/gaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaul/subscriptions","organizations_url":"https://api.github.com/users/gaul/orgs","repos_url":"https://api.github.com/users/gaul/repos","events_url":"https://api.github.com/users/gaul/events{/privacy}","received_events_url":"https://api.github.com/users/gaul/received_events","type":"User","site_admin":false},"repo":{"id":22321368,"node_id":"MDEwOlJlcG9zaXRvcnkyMjMyMTM2OA==","name":"s3proxy","full_name":"gaul/s3proxy","private":false,"owner":{"login":"gaul","id":848247,"node_id":"MDQ6VXNlcjg0ODI0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/848247?v=4","gravatar_id":"","url":"https://api.github.com/users/gaul","html_url":"https://github.com/gaul","followers_url":"https://api.github.com/users/gaul/followers","following_url":"https://api.github.com/users/gaul/following{/other_user}","gists_url":"https://api.github.com/users/gaul/gists{/gist_id}","starred_url":"https://api.github.com/users/gaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaul/subscriptions","organizations_url":"https://api.github.com/users/gaul/orgs","repos_url":"https://api.github.com/users/gaul/repos","events_url":"https://api.github.com/users/gaul/events{/privacy}","received_events_url":"https://api.github.com/users/gaul/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gaul/s3proxy","description":"Access other storage backends via the S3 API","fork":false,"url":"https://api.github.com/repos/gaul/s3proxy","forks_url":"https://api.github.com/repos/gaul/s3proxy/forks","keys_url":"https://api.github.com/repos/gaul/s3proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaul/s3proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaul/s3proxy/teams","hooks_url":"https://api.github.com/repos/gaul/s3proxy/hooks","issue_events_url":"https://api.github.com/repos/gaul/s3proxy/issues/events{/number}","events_url":"https://api.github.com/repos/gaul/s3proxy/events","assignees_url":"https://api.github.com/repos/gaul/s3proxy/assignees{/user}","branches_url":"https://api.github.com/repos/gaul/s3proxy/branches{/branch}","tags_url":"https://api.github.com/repos/gaul/s3proxy/tags","blobs_url":"https://api.github.com/repos/gaul/s3proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaul/s3proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaul/s3proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaul/s3proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaul/s3proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/gaul/s3proxy/languages","stargazers_url":"https://api.github.com/repos/gaul/s3proxy/stargazers","contributors_url":"https://api.github.com/repos/gaul/s3proxy/contributors","subscribers_url":"https://api.github.com/repos/gaul/s3proxy/subscribers","subscription_url":"https://api.github.com/repos/gaul/s3proxy/subscription","commits_url":"https://api.github.com/repos/gaul/s3proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaul/s3proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaul/s3proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaul/s3proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaul/s3proxy/contents/{+path}","compare_url":"https://api.github.com/repos/gaul/s3proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaul/s3proxy/merges","archive_url":"https://api.github.com/repos/gaul/s3proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaul/s3proxy/downloads","issues_url":"https://api.github.com/repos/gaul/s3proxy/issues{/number}","pulls_url":"https://api.github.com/repos/gaul/s3proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/gaul/s3proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/gaul/s3proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaul/s3proxy/labels{/name}","releases_url":"https://api.github.com/repos/gaul/s3proxy/releases{/id}","deployments_url":"https://api.github.com/repos/gaul/s3proxy/deployments","created_at":"2014-07-27T20:32:24Z","updated_at":"2018-11-14T20:49:30Z","pushed_at":"2018-11-14T20:49:28Z","git_url":"git://github.com/gaul/s3proxy.git","ssh_url":"git@github.com:gaul/s3proxy.git","clone_url":"https://github.com/gaul/s3proxy.git","svn_url":"https://github.com/gaul/s3proxy","homepage":"","size":1406,"stargazers_count":666,"watchers_count":666,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":49,"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":97,"open_issues":49,"watchers":666,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gaul/s3proxy/pulls/287"},"html":{"href":"https://github.com/gaul/s3proxy/pull/287"},"issue":{"href":"https://api.github.com/repos/gaul/s3proxy/issues/287"},"comments":{"href":"https://api.github.com/repos/gaul/s3proxy/issues/287/comments"},"review_comments":{"href":"https://api.github.com/repos/gaul/s3proxy/pulls/287/comments"},"review_comment":{"href":"https://api.github.com/repos/gaul/s3proxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gaul/s3proxy/pulls/287/commits"},"statuses":{"href":"https://api.github.com/repos/gaul/s3proxy/statuses/e5d5f5e94cc453f4d9bf1f2c74246f505deabdf8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gaul"}}