{"action":"created","issue":{"url":"https://api.github.com/repos/gorilla/handlers/issues/61","labels_url":"https://api.github.com/repos/gorilla/handlers/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/gorilla/handlers/issues/61/comments","events_url":"https://api.github.com/repos/gorilla/handlers/issues/61/events","html_url":"https://github.com/gorilla/handlers/pull/61","id":126772997,"number":61,"title":"Bugfix for reusing CORS() configuration with multiple handlers","user":{"login":"saranrapjs","id":707098,"avatar_url":"https://avatars.githubusercontent.com/u/707098?v=3","gravatar_id":"","url":"https://api.github.com/users/saranrapjs","html_url":"https://github.com/saranrapjs","followers_url":"https://api.github.com/users/saranrapjs/followers","following_url":"https://api.github.com/users/saranrapjs/following{/other_user}","gists_url":"https://api.github.com/users/saranrapjs/gists{/gist_id}","starred_url":"https://api.github.com/users/saranrapjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saranrapjs/subscriptions","organizations_url":"https://api.github.com/users/saranrapjs/orgs","repos_url":"https://api.github.com/users/saranrapjs/repos","events_url":"https://api.github.com/users/saranrapjs/events{/privacy}","received_events_url":"https://api.github.com/users/saranrapjs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-14T23:31:50Z","updated_at":"2016-01-15T02:30:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gorilla/handlers/pulls/61","html_url":"https://github.com/gorilla/handlers/pull/61","diff_url":"https://github.com/gorilla/handlers/pull/61.diff","patch_url":"https://github.com/gorilla/handlers/pull/61.patch"},"body":"I was running into a weird issue where my re-using of the CORS handler would lead to the wrong handler being called by my mux, and tracked it down to this bug. I noted that in comparably-configured middleware, like [CSRF](https://github.com/gorilla/csrf/blob/master/csrf.go#L123), the factory should set the handler *inside* the closure. \r\n\r\nThis branch very simply does just that (+ I added a test, which might be overkill)."},"comment":{"url":"https://api.github.com/repos/gorilla/handlers/issues/comments/171850529","html_url":"https://github.com/gorilla/handlers/pull/61#issuecomment-171850529","issue_url":"https://api.github.com/repos/gorilla/handlers/issues/61","id":171850529,"user":{"login":"kisielk","id":58618,"avatar_url":"https://avatars.githubusercontent.com/u/58618?v=3","gravatar_id":"","url":"https://api.github.com/users/kisielk","html_url":"https://github.com/kisielk","followers_url":"https://api.github.com/users/kisielk/followers","following_url":"https://api.github.com/users/kisielk/following{/other_user}","gists_url":"https://api.github.com/users/kisielk/gists{/gist_id}","starred_url":"https://api.github.com/users/kisielk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kisielk/subscriptions","organizations_url":"https://api.github.com/users/kisielk/orgs","repos_url":"https://api.github.com/users/kisielk/repos","events_url":"https://api.github.com/users/kisielk/events{/privacy}","received_events_url":"https://api.github.com/users/kisielk/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T02:30:31Z","updated_at":"2016-01-15T02:30:31Z","body":"@elithrar so good to merge then?"}}