{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/comments/62070991","id":62070991,"diff_hunk":"@@ -95,3 +95,11 @@ exports.findAvailablePort = function(app){\n   });\n \n }\n+\n+exports.forceHttps = function(req, res, next) {\n+  if (req.headers['x-forwarded-proto'] !== 'https') {\n+    console.log('Redirecting request to HTTPs');","path":"lib/utils.js","position":7,"original_position":7,"commit_id":"228b9dac64cf3eaf893440f96b144e4bc06540da","original_commit_id":"228b9dac64cf3eaf893440f96b144e4bc06540da","user":{"login":"joelanman","id":1132904,"avatar_url":"https://avatars.githubusercontent.com/u/1132904?v=3","gravatar_id":"","url":"https://api.github.com/users/joelanman","html_url":"https://github.com/joelanman","followers_url":"https://api.github.com/users/joelanman/followers","following_url":"https://api.github.com/users/joelanman/following{/other_user}","gists_url":"https://api.github.com/users/joelanman/gists{/gist_id}","starred_url":"https://api.github.com/users/joelanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelanman/subscriptions","organizations_url":"https://api.github.com/users/joelanman/orgs","repos_url":"https://api.github.com/users/joelanman/repos","events_url":"https://api.github.com/users/joelanman/events{/privacy}","received_events_url":"https://api.github.com/users/joelanman/received_events","type":"User","site_admin":false},"body":"little s","created_at":"2016-05-04T16:31:11Z","updated_at":"2016-05-04T16:31:11Z","html_url":"https://github.com/alphagov/govuk_prototype_kit/pull/188#discussion_r62070991","pull_request_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188","_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/comments/62070991"},"html":{"href":"https://github.com/alphagov/govuk_prototype_kit/pull/188#discussion_r62070991"},"pull_request":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188","id":68869878,"html_url":"https://github.com/alphagov/govuk_prototype_kit/pull/188","diff_url":"https://github.com/alphagov/govuk_prototype_kit/pull/188.diff","patch_url":"https://github.com/alphagov/govuk_prototype_kit/pull/188.patch","issue_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/188","number":188,"state":"open","locked":false,"title":"Force SSL on production","user":{"login":"edwardhorsford","id":2204224,"avatar_url":"https://avatars.githubusercontent.com/u/2204224?v=3","gravatar_id":"","url":"https://api.github.com/users/edwardhorsford","html_url":"https://github.com/edwardhorsford","followers_url":"https://api.github.com/users/edwardhorsford/followers","following_url":"https://api.github.com/users/edwardhorsford/following{/other_user}","gists_url":"https://api.github.com/users/edwardhorsford/gists{/gist_id}","starred_url":"https://api.github.com/users/edwardhorsford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwardhorsford/subscriptions","organizations_url":"https://api.github.com/users/edwardhorsford/orgs","repos_url":"https://api.github.com/users/edwardhorsford/repos","events_url":"https://api.github.com/users/edwardhorsford/events{/privacy}","received_events_url":"https://api.github.com/users/edwardhorsford/received_events","type":"User","site_admin":false},"body":"This redirects requests to https. \r\n\r\nHeroku has SSL built in, so for most prototypes, things should work as normal, except with SSL.\r\n\r\nNote: I think this is a breaking change, since it requires production servers to have HTTPs set up.","created_at":"2016-05-04T14:20:58Z","updated_at":"2016-05-04T16:31:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff2b949d0a8bef6d17a9acc6ae996267a699ebaf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188/commits","review_comments_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188/comments","review_comment_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/188/comments","statuses_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/statuses/228b9dac64cf3eaf893440f96b144e4bc06540da","head":{"label":"alphagov:force_SSL","ref":"force_SSL","sha":"228b9dac64cf3eaf893440f96b144e4bc06540da","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":21242339,"name":"govuk_prototype_kit","full_name":"alphagov/govuk_prototype_kit","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk_prototype_kit","description":"Quick prototyping tool for UK government digital services","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_prototype_kit","forks_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/deployments","created_at":"2014-06-26T13:54:09Z","updated_at":"2016-04-26T10:00:09Z","pushed_at":"2016-05-04T16:30:47Z","git_url":"git://github.com/alphagov/govuk_prototype_kit.git","ssh_url":"git@github.com:alphagov/govuk_prototype_kit.git","clone_url":"https://github.com/alphagov/govuk_prototype_kit.git","svn_url":"https://github.com/alphagov/govuk_prototype_kit","homepage":"","size":12980,"stargazers_count":50,"watchers_count":50,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":39,"forks":48,"open_issues":39,"watchers":50,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"31fdcc3856400f3ffb3ef4f99fc211a206847540","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":21242339,"name":"govuk_prototype_kit","full_name":"alphagov/govuk_prototype_kit","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk_prototype_kit","description":"Quick prototyping tool for UK government digital services","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_prototype_kit","forks_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk_prototype_kit/deployments","created_at":"2014-06-26T13:54:09Z","updated_at":"2016-04-26T10:00:09Z","pushed_at":"2016-05-04T16:30:47Z","git_url":"git://github.com/alphagov/govuk_prototype_kit.git","ssh_url":"git@github.com:alphagov/govuk_prototype_kit.git","clone_url":"https://github.com/alphagov/govuk_prototype_kit.git","svn_url":"https://github.com/alphagov/govuk_prototype_kit","homepage":"","size":12980,"stargazers_count":50,"watchers_count":50,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":39,"forks":48,"open_issues":39,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188"},"html":{"href":"https://github.com/alphagov/govuk_prototype_kit/pull/188"},"issue":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/188"},"comments":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govuk_prototype_kit/statuses/228b9dac64cf3eaf893440f96b144e4bc06540da"}}}}