{"action":"created","issue":{"url":"https://api.github.com/repos/line/armeria/issues/206","repository_url":"https://api.github.com/repos/line/armeria","labels_url":"https://api.github.com/repos/line/armeria/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/line/armeria/issues/206/comments","events_url":"https://api.github.com/repos/line/armeria/issues/206/events","html_url":"https://github.com/line/armeria/pull/206","id":167198663,"number":206,"title":"add CORS","user":{"login":"jprante","id":635745,"avatar_url":"https://avatars.githubusercontent.com/u/635745?v=3","gravatar_id":"","url":"https://api.github.com/users/jprante","html_url":"https://github.com/jprante","followers_url":"https://api.github.com/users/jprante/followers","following_url":"https://api.github.com/users/jprante/following{/other_user}","gists_url":"https://api.github.com/users/jprante/gists{/gist_id}","starred_url":"https://api.github.com/users/jprante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jprante/subscriptions","organizations_url":"https://api.github.com/users/jprante/orgs","repos_url":"https://api.github.com/users/jprante/repos","events_url":"https://api.github.com/users/jprante/events{/privacy}","received_events_url":"https://api.github.com/users/jprante/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-23T19:11:33Z","updated_at":"2016-07-29T02:30:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/line/armeria/pulls/206","html_url":"https://github.com/line/armeria/pull/206","diff_url":"https://github.com/line/armeria/pull/206.diff","patch_url":"https://github.com/line/armeria/pull/206.patch"},"body":"In #205, I asked about how to integrate Netty's `CorsHandler` into Armeria. After @trustin commented, I investigated how to implement it and It turned out that Netty HTTP handlers do not fit into Armeria's HTTP request/response handling, which is capable to process both HTTP 1 and HTTP/2.\r\n\r\nSo I decided to add the logic of `CorsHandler` to Armeria's `HttpServerHandler`, which seems to be the best place to check CORS headers and modify response headers for both HTTP 1 and HTTP/2.\r\n\r\nThe `ServerBuilder` is extended by a `cors(CorsConfig)` method in order to allow to set up CORS in an Armeria server.\r\n\r\nAlso in this patch, some CORS test methods have been added to`SimpleHttpClientIntegrationTest`. They test the preflight option request, an allowed CORS request, and a forbidden CORS request."},"comment":{"url":"https://api.github.com/repos/line/armeria/issues/comments/236079412","html_url":"https://github.com/line/armeria/pull/206#issuecomment-236079412","issue_url":"https://api.github.com/repos/line/armeria/issues/206","id":236079412,"user":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T02:30:06Z","updated_at":"2016-07-29T02:30:06Z","body":"Whoa, what a high quality pull request! Awesome work! Before merging this PR, could you sign the ICLA?\r\n\r\nhttps://feedback.line.me/enquete/public/799-Z6ygVz3U"}}
{"actor":{"display_login":"trustin"}}