{"action":"created","comment":{"url":"https://api.github.com/repos/koajs/koa/pulls/comments/54521089","id":54521089,"diff_hunk":"@@ -80,4 +80,43 @@ describe('ctx.cookies.set()', function(){\n       })\n     })\n   })\n+\n+  describe('with secure', function(){\n+    it('should get secure from request', function(done){\n+      var app = koa();\n+\n+      app.proxy = true;\n+      app.keys = ['a', 'b'];\n+\n+      app.use(function *(next){\n+        this.cookies.set('name', 'jon', { signed: true });","path":"test/context/cookies.js","position":13,"original_position":13,"commit_id":"b5c1a60ac3016eab89d7ae98dd33a21134ad4708","original_commit_id":"b5c1a60ac3016eab89d7ae98dd33a21134ad4708","user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"body":"Nevermine, it's automatic :)","created_at":"2016-03-01T04:17:50Z","updated_at":"2016-03-01T04:17:50Z","html_url":"https://github.com/koajs/koa/pull/614#discussion_r54521089","pull_request_url":"https://api.github.com/repos/koajs/koa/pulls/614","_links":{"self":{"href":"https://api.github.com/repos/koajs/koa/pulls/comments/54521089"},"html":{"href":"https://github.com/koajs/koa/pull/614#discussion_r54521089"},"pull_request":{"href":"https://api.github.com/repos/koajs/koa/pulls/614"}}},"pull_request":{"url":"https://api.github.com/repos/koajs/koa/pulls/614","id":52409221,"html_url":"https://github.com/koajs/koa/pull/614","diff_url":"https://github.com/koajs/koa/pull/614.diff","patch_url":"https://github.com/koajs/koa/pull/614.patch","issue_url":"https://api.github.com/repos/koajs/koa/issues/614","number":614,"state":"open","locked":false,"title":"fix cookies' secure detect","user":{"login":"dead-horse","id":985607,"avatar_url":"https://avatars.githubusercontent.com/u/985607?v=3","gravatar_id":"","url":"https://api.github.com/users/dead-horse","html_url":"https://github.com/dead-horse","followers_url":"https://api.github.com/users/dead-horse/followers","following_url":"https://api.github.com/users/dead-horse/following{/other_user}","gists_url":"https://api.github.com/users/dead-horse/gists{/gist_id}","starred_url":"https://api.github.com/users/dead-horse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead-horse/subscriptions","organizations_url":"https://api.github.com/users/dead-horse/orgs","repos_url":"https://api.github.com/users/dead-horse/repos","events_url":"https://api.github.com/users/dead-horse/events{/privacy}","received_events_url":"https://api.github.com/users/dead-horse/received_events","type":"User","site_admin":false},"body":"koa don't change the original request object, need to pass koa's request object to cookies.\r\n\r\n(but you can't replace res with response, so this is kind of weird. :( ","created_at":"2015-12-02T15:23:16Z","updated_at":"2016-03-01T04:17:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0a23ea43df172cbabda97dc54d7113fa36fafc0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/koajs/koa/pulls/614/commits","review_comments_url":"https://api.github.com/repos/koajs/koa/pulls/614/comments","review_comment_url":"https://api.github.com/repos/koajs/koa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koajs/koa/issues/614/comments","statuses_url":"https://api.github.com/repos/koajs/koa/statuses/b5c1a60ac3016eab89d7ae98dd33a21134ad4708","head":{"label":"koajs:fix-cookie-secure","ref":"fix-cookie-secure","sha":"b5c1a60ac3016eab89d7ae98dd33a21134ad4708","user":{"login":"koajs","id":5055057,"avatar_url":"https://avatars.githubusercontent.com/u/5055057?v=3","gravatar_id":"","url":"https://api.github.com/users/koajs","html_url":"https://github.com/koajs","followers_url":"https://api.github.com/users/koajs/followers","following_url":"https://api.github.com/users/koajs/following{/other_user}","gists_url":"https://api.github.com/users/koajs/gists{/gist_id}","starred_url":"https://api.github.com/users/koajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koajs/subscriptions","organizations_url":"https://api.github.com/users/koajs/orgs","repos_url":"https://api.github.com/users/koajs/repos","events_url":"https://api.github.com/users/koajs/events{/privacy}","received_events_url":"https://api.github.com/users/koajs/received_events","type":"Organization","site_admin":false},"repo":{"id":11551538,"name":"koa","full_name":"koajs/koa","owner":{"login":"koajs","id":5055057,"avatar_url":"https://avatars.githubusercontent.com/u/5055057?v=3","gravatar_id":"","url":"https://api.github.com/users/koajs","html_url":"https://github.com/koajs","followers_url":"https://api.github.com/users/koajs/followers","following_url":"https://api.github.com/users/koajs/following{/other_user}","gists_url":"https://api.github.com/users/koajs/gists{/gist_id}","starred_url":"https://api.github.com/users/koajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koajs/subscriptions","organizations_url":"https://api.github.com/users/koajs/orgs","repos_url":"https://api.github.com/users/koajs/repos","events_url":"https://api.github.com/users/koajs/events{/privacy}","received_events_url":"https://api.github.com/users/koajs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koajs/koa","description":"Expressive middleware for node.js using generators","fork":false,"url":"https://api.github.com/repos/koajs/koa","forks_url":"https://api.github.com/repos/koajs/koa/forks","keys_url":"https://api.github.com/repos/koajs/koa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koajs/koa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koajs/koa/teams","hooks_url":"https://api.github.com/repos/koajs/koa/hooks","issue_events_url":"https://api.github.com/repos/koajs/koa/issues/events{/number}","events_url":"https://api.github.com/repos/koajs/koa/events","assignees_url":"https://api.github.com/repos/koajs/koa/assignees{/user}","branches_url":"https://api.github.com/repos/koajs/koa/branches{/branch}","tags_url":"https://api.github.com/repos/koajs/koa/tags","blobs_url":"https://api.github.com/repos/koajs/koa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koajs/koa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koajs/koa/git/refs{/sha}","trees_url":"https://api.github.com/repos/koajs/koa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koajs/koa/statuses/{sha}","languages_url":"https://api.github.com/repos/koajs/koa/languages","stargazers_url":"https://api.github.com/repos/koajs/koa/stargazers","contributors_url":"https://api.github.com/repos/koajs/koa/contributors","subscribers_url":"https://api.github.com/repos/koajs/koa/subscribers","subscription_url":"https://api.github.com/repos/koajs/koa/subscription","commits_url":"https://api.github.com/repos/koajs/koa/commits{/sha}","git_commits_url":"https://api.github.com/repos/koajs/koa/git/commits{/sha}","comments_url":"https://api.github.com/repos/koajs/koa/comments{/number}","issue_comment_url":"https://api.github.com/repos/koajs/koa/issues/comments{/number}","contents_url":"https://api.github.com/repos/koajs/koa/contents/{+path}","compare_url":"https://api.github.com/repos/koajs/koa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koajs/koa/merges","archive_url":"https://api.github.com/repos/koajs/koa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koajs/koa/downloads","issues_url":"https://api.github.com/repos/koajs/koa/issues{/number}","pulls_url":"https://api.github.com/repos/koajs/koa/pulls{/number}","milestones_url":"https://api.github.com/repos/koajs/koa/milestones{/number}","notifications_url":"https://api.github.com/repos/koajs/koa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koajs/koa/labels{/name}","releases_url":"https://api.github.com/repos/koajs/koa/releases{/id}","deployments_url":"https://api.github.com/repos/koajs/koa/deployments","created_at":"2013-07-20T18:53:45Z","updated_at":"2016-03-01T02:47:29Z","pushed_at":"2016-03-01T03:56:38Z","git_url":"git://github.com/koajs/koa.git","ssh_url":"git@github.com:koajs/koa.git","clone_url":"https://github.com/koajs/koa.git","svn_url":"https://github.com/koajs/koa","homepage":"http://koajs.com","size":1852,"stargazers_count":9152,"watchers_count":9152,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":688,"mirror_url":null,"open_issues_count":26,"forks":688,"open_issues":26,"watchers":9152,"default_branch":"master"}},"base":{"label":"koajs:master","ref":"master","sha":"93c356ac7c2b1ec4a327173494e416589944715d","user":{"login":"koajs","id":5055057,"avatar_url":"https://avatars.githubusercontent.com/u/5055057?v=3","gravatar_id":"","url":"https://api.github.com/users/koajs","html_url":"https://github.com/koajs","followers_url":"https://api.github.com/users/koajs/followers","following_url":"https://api.github.com/users/koajs/following{/other_user}","gists_url":"https://api.github.com/users/koajs/gists{/gist_id}","starred_url":"https://api.github.com/users/koajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koajs/subscriptions","organizations_url":"https://api.github.com/users/koajs/orgs","repos_url":"https://api.github.com/users/koajs/repos","events_url":"https://api.github.com/users/koajs/events{/privacy}","received_events_url":"https://api.github.com/users/koajs/received_events","type":"Organization","site_admin":false},"repo":{"id":11551538,"name":"koa","full_name":"koajs/koa","owner":{"login":"koajs","id":5055057,"avatar_url":"https://avatars.githubusercontent.com/u/5055057?v=3","gravatar_id":"","url":"https://api.github.com/users/koajs","html_url":"https://github.com/koajs","followers_url":"https://api.github.com/users/koajs/followers","following_url":"https://api.github.com/users/koajs/following{/other_user}","gists_url":"https://api.github.com/users/koajs/gists{/gist_id}","starred_url":"https://api.github.com/users/koajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koajs/subscriptions","organizations_url":"https://api.github.com/users/koajs/orgs","repos_url":"https://api.github.com/users/koajs/repos","events_url":"https://api.github.com/users/koajs/events{/privacy}","received_events_url":"https://api.github.com/users/koajs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koajs/koa","description":"Expressive middleware for node.js using generators","fork":false,"url":"https://api.github.com/repos/koajs/koa","forks_url":"https://api.github.com/repos/koajs/koa/forks","keys_url":"https://api.github.com/repos/koajs/koa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koajs/koa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koajs/koa/teams","hooks_url":"https://api.github.com/repos/koajs/koa/hooks","issue_events_url":"https://api.github.com/repos/koajs/koa/issues/events{/number}","events_url":"https://api.github.com/repos/koajs/koa/events","assignees_url":"https://api.github.com/repos/koajs/koa/assignees{/user}","branches_url":"https://api.github.com/repos/koajs/koa/branches{/branch}","tags_url":"https://api.github.com/repos/koajs/koa/tags","blobs_url":"https://api.github.com/repos/koajs/koa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koajs/koa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koajs/koa/git/refs{/sha}","trees_url":"https://api.github.com/repos/koajs/koa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koajs/koa/statuses/{sha}","languages_url":"https://api.github.com/repos/koajs/koa/languages","stargazers_url":"https://api.github.com/repos/koajs/koa/stargazers","contributors_url":"https://api.github.com/repos/koajs/koa/contributors","subscribers_url":"https://api.github.com/repos/koajs/koa/subscribers","subscription_url":"https://api.github.com/repos/koajs/koa/subscription","commits_url":"https://api.github.com/repos/koajs/koa/commits{/sha}","git_commits_url":"https://api.github.com/repos/koajs/koa/git/commits{/sha}","comments_url":"https://api.github.com/repos/koajs/koa/comments{/number}","issue_comment_url":"https://api.github.com/repos/koajs/koa/issues/comments{/number}","contents_url":"https://api.github.com/repos/koajs/koa/contents/{+path}","compare_url":"https://api.github.com/repos/koajs/koa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koajs/koa/merges","archive_url":"https://api.github.com/repos/koajs/koa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koajs/koa/downloads","issues_url":"https://api.github.com/repos/koajs/koa/issues{/number}","pulls_url":"https://api.github.com/repos/koajs/koa/pulls{/number}","milestones_url":"https://api.github.com/repos/koajs/koa/milestones{/number}","notifications_url":"https://api.github.com/repos/koajs/koa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koajs/koa/labels{/name}","releases_url":"https://api.github.com/repos/koajs/koa/releases{/id}","deployments_url":"https://api.github.com/repos/koajs/koa/deployments","created_at":"2013-07-20T18:53:45Z","updated_at":"2016-03-01T02:47:29Z","pushed_at":"2016-03-01T03:56:38Z","git_url":"git://github.com/koajs/koa.git","ssh_url":"git@github.com:koajs/koa.git","clone_url":"https://github.com/koajs/koa.git","svn_url":"https://github.com/koajs/koa","homepage":"http://koajs.com","size":1852,"stargazers_count":9152,"watchers_count":9152,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":688,"mirror_url":null,"open_issues_count":26,"forks":688,"open_issues":26,"watchers":9152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koajs/koa/pulls/614"},"html":{"href":"https://github.com/koajs/koa/pull/614"},"issue":{"href":"https://api.github.com/repos/koajs/koa/issues/614"},"comments":{"href":"https://api.github.com/repos/koajs/koa/issues/614/comments"},"review_comments":{"href":"https://api.github.com/repos/koajs/koa/pulls/614/comments"},"review_comment":{"href":"https://api.github.com/repos/koajs/koa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koajs/koa/pulls/614/commits"},"statuses":{"href":"https://api.github.com/repos/koajs/koa/statuses/b5c1a60ac3016eab89d7ae98dd33a21134ad4708"}}}}