{"action":"opened","number":85,"pull_request":{"url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/85","id":37349710,"html_url":"https://github.com/tonycoco/heroku-buildpack-ember-cli/pull/85","diff_url":"https://github.com/tonycoco/heroku-buildpack-ember-cli/pull/85.diff","patch_url":"https://github.com/tonycoco/heroku-buildpack-ember-cli/pull/85.patch","issue_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues/85","number":85,"state":"open","locked":false,"title":"Add force HTTPS support for CloudFlare","user":{"login":"harianus","id":1079135,"avatar_url":"https://avatars.githubusercontent.com/u/1079135?v=3","gravatar_id":"","url":"https://api.github.com/users/harianus","html_url":"https://github.com/harianus","followers_url":"https://api.github.com/users/harianus/followers","following_url":"https://api.github.com/users/harianus/following{/other_user}","gists_url":"https://api.github.com/users/harianus/gists{/gist_id}","starred_url":"https://api.github.com/users/harianus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harianus/subscriptions","organizations_url":"https://api.github.com/users/harianus/orgs","repos_url":"https://api.github.com/users/harianus/repos","events_url":"https://api.github.com/users/harianus/events{/privacy}","received_events_url":"https://api.github.com/users/harianus/received_events","type":"User","site_admin":false},"body":"As discussed in https://github.com/tonycoco/heroku-buildpack-ember-cli/issues/83 I added support for the CloudFlare SSL header. Updated the docs with links to the official documentation.\r\n\r\nI saw nowhere in the nginx config file comments, so I left the comments out of the pull request, I'll add it here so we can always find it.\r\n\r\n```erb\r\n<% if ENV[\"FORCE_HTTPS\"] && ENV[\"FORCE_HTTPS\"] == \"true\" %>\r\n  <%# Set default value for CloudFlare %>\r\n  set $cloudflare NO;\r\n  <%# This matches http and https ($http_cf_visitor: {\"scheme\": \"https\"})%>\r\n  if ($http_cf_visitor ~* 'http') {\r\n    set $cloudflare YES;\r\n  }\r\n  <%# Redirect when is matches \"http\" (with quotes) %>\r\n  if ($http_cf_visitor ~* '\"http\"') {\r\n    return 301 https://$host$request_uri;\r\n  }\r\n\r\n  <%# Only redirect when CloudFlare is false %>\r\n  set $cloudflare_heroku \"${cloudflare}\";\r\n  <%# Test for Heroku header, this matches http and https %>\r\n  if ($http_x_forwarded_proto ~* 'http') {\r\n    set $cloudflare_heroku \"${cloudflare_heroku}YES\";\r\n  }\r\n  <%# Test for \"https\" (without quotes) in Heroku header %>\r\n  if ($http_x_forwarded_proto !~* 'https') {\r\n    set $cloudflare_heroku \"${cloudflare_heroku}HTTP\";\r\n  }\r\n  <%# Redirect when CloudFlare is false and Heroku http is true %>\r\n  if ($cloudflare_heroku = NOYESHTTP) {\r\n    return 301 https://$host$request_uri;\r\n  }\r\n<% end %>\r\n```","created_at":"2015-06-10T11:43:32Z","updated_at":"2015-06-10T11:43:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/85/commits","review_comments_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/85/comments","review_comment_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues/85/comments","statuses_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/statuses/0648af763a8b0859b168d9fd1968daecda07d2dd","head":{"label":"harianus:add-cloudflare-https-support","ref":"add-cloudflare-https-support","sha":"0648af763a8b0859b168d9fd1968daecda07d2dd","user":{"login":"harianus","id":1079135,"avatar_url":"https://avatars.githubusercontent.com/u/1079135?v=3","gravatar_id":"","url":"https://api.github.com/users/harianus","html_url":"https://github.com/harianus","followers_url":"https://api.github.com/users/harianus/followers","following_url":"https://api.github.com/users/harianus/following{/other_user}","gists_url":"https://api.github.com/users/harianus/gists{/gist_id}","starred_url":"https://api.github.com/users/harianus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harianus/subscriptions","organizations_url":"https://api.github.com/users/harianus/orgs","repos_url":"https://api.github.com/users/harianus/repos","events_url":"https://api.github.com/users/harianus/events{/privacy}","received_events_url":"https://api.github.com/users/harianus/received_events","type":"User","site_admin":false},"repo":{"id":37193549,"name":"heroku-buildpack-ember-cli","full_name":"harianus/heroku-buildpack-ember-cli","owner":{"login":"harianus","id":1079135,"avatar_url":"https://avatars.githubusercontent.com/u/1079135?v=3","gravatar_id":"","url":"https://api.github.com/users/harianus","html_url":"https://github.com/harianus","followers_url":"https://api.github.com/users/harianus/followers","following_url":"https://api.github.com/users/harianus/following{/other_user}","gists_url":"https://api.github.com/users/harianus/gists{/gist_id}","starred_url":"https://api.github.com/users/harianus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harianus/subscriptions","organizations_url":"https://api.github.com/users/harianus/orgs","repos_url":"https://api.github.com/users/harianus/repos","events_url":"https://api.github.com/users/harianus/events{/privacy}","received_events_url":"https://api.github.com/users/harianus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/harianus/heroku-buildpack-ember-cli","description":"A Heroku Buildpack for Ember CLI Applications","fork":true,"url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli","forks_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/forks","keys_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/teams","hooks_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/hooks","issue_events_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/issues/events{/number}","events_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/events","assignees_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/assignees{/user}","branches_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/branches{/branch}","tags_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/tags","blobs_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/languages","stargazers_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/stargazers","contributors_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/contributors","subscribers_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/subscribers","subscription_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/subscription","commits_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/contents/{+path}","compare_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/merges","archive_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/downloads","issues_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/issues{/number}","pulls_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/labels{/name}","releases_url":"https://api.github.com/repos/harianus/heroku-buildpack-ember-cli/releases{/id}","created_at":"2015-06-10T11:37:56Z","updated_at":"2015-06-10T11:37:57Z","pushed_at":"2015-06-10T11:41:30Z","git_url":"git://github.com/harianus/heroku-buildpack-ember-cli.git","ssh_url":"git@github.com:harianus/heroku-buildpack-ember-cli.git","clone_url":"https://github.com/harianus/heroku-buildpack-ember-cli.git","svn_url":"https://github.com/harianus/heroku-buildpack-ember-cli","homepage":"","size":2335,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tonycoco:master","ref":"master","sha":"ccb923a06116e99f698f68fff9c4c61a958da3d1","user":{"login":"tonycoco","id":19303,"avatar_url":"https://avatars.githubusercontent.com/u/19303?v=3","gravatar_id":"","url":"https://api.github.com/users/tonycoco","html_url":"https://github.com/tonycoco","followers_url":"https://api.github.com/users/tonycoco/followers","following_url":"https://api.github.com/users/tonycoco/following{/other_user}","gists_url":"https://api.github.com/users/tonycoco/gists{/gist_id}","starred_url":"https://api.github.com/users/tonycoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonycoco/subscriptions","organizations_url":"https://api.github.com/users/tonycoco/orgs","repos_url":"https://api.github.com/users/tonycoco/repos","events_url":"https://api.github.com/users/tonycoco/events{/privacy}","received_events_url":"https://api.github.com/users/tonycoco/received_events","type":"User","site_admin":false},"repo":{"id":20418178,"name":"heroku-buildpack-ember-cli","full_name":"tonycoco/heroku-buildpack-ember-cli","owner":{"login":"tonycoco","id":19303,"avatar_url":"https://avatars.githubusercontent.com/u/19303?v=3","gravatar_id":"","url":"https://api.github.com/users/tonycoco","html_url":"https://github.com/tonycoco","followers_url":"https://api.github.com/users/tonycoco/followers","following_url":"https://api.github.com/users/tonycoco/following{/other_user}","gists_url":"https://api.github.com/users/tonycoco/gists{/gist_id}","starred_url":"https://api.github.com/users/tonycoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonycoco/subscriptions","organizations_url":"https://api.github.com/users/tonycoco/orgs","repos_url":"https://api.github.com/users/tonycoco/repos","events_url":"https://api.github.com/users/tonycoco/events{/privacy}","received_events_url":"https://api.github.com/users/tonycoco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tonycoco/heroku-buildpack-ember-cli","description":"A Heroku Buildpack for Ember CLI Applications","fork":false,"url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli","forks_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/forks","keys_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/teams","hooks_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/hooks","issue_events_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/events","assignees_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/tags","blobs_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/languages","stargazers_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/stargazers","contributors_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/contributors","subscribers_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/subscribers","subscription_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/subscription","commits_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/merges","archive_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/downloads","issues_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/labels{/name}","releases_url":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/releases{/id}","created_at":"2014-06-02T20:17:44Z","updated_at":"2015-06-08T18:59:07Z","pushed_at":"2015-06-10T11:31:39Z","git_url":"git://github.com/tonycoco/heroku-buildpack-ember-cli.git","ssh_url":"git@github.com:tonycoco/heroku-buildpack-ember-cli.git","clone_url":"https://github.com/tonycoco/heroku-buildpack-ember-cli.git","svn_url":"https://github.com/tonycoco/heroku-buildpack-ember-cli","homepage":"","size":2335,"stargazers_count":205,"watchers_count":205,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":5,"forks":61,"open_issues":5,"watchers":205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/85"},"html":{"href":"https://github.com/tonycoco/heroku-buildpack-ember-cli/pull/85"},"issue":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues/85"},"comments":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/tonycoco/heroku-buildpack-ember-cli/statuses/0648af763a8b0859b168d9fd1968daecda07d2dd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":3,"changed_files":2}}