{"action":"created","comment":{"url":"https://api.github.com/repos/cph/discourse/pulls/comments/87418975","pull_request_review_id":8032434,"id":87418975,"diff_hunk":"@@ -285,7 +285,7 @@ def ensure_logged_in\n     end\n \n     def redirect_to_login_if_required\n-      redirect_to :login if SiteSetting.login_required? && !current_user\n+      redirect_to(:login, host: Discourse.current_hostname) if SiteSetting.login_required? && !current_user","path":"app/controllers/application_controller.rb","position":5,"original_position":5,"commit_id":"4822d009dc1f5dce2ca12caf80c45292ec20cec3","original_commit_id":"4822d009dc1f5dce2ca12caf80c45292ec20cec3","user":{"login":"ben5516","id":53109,"avatar_url":"https://avatars.githubusercontent.com/u/53109?v=3","gravatar_id":"","url":"https://api.github.com/users/ben5516","html_url":"https://github.com/ben5516","followers_url":"https://api.github.com/users/ben5516/followers","following_url":"https://api.github.com/users/ben5516/following{/other_user}","gists_url":"https://api.github.com/users/ben5516/gists{/gist_id}","starred_url":"https://api.github.com/users/ben5516/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben5516/subscriptions","organizations_url":"https://api.github.com/users/ben5516/orgs","repos_url":"https://api.github.com/users/ben5516/repos","events_url":"https://api.github.com/users/ben5516/events{/privacy}","received_events_url":"https://api.github.com/users/ben5516/received_events","type":"User","site_admin":false},"body":"I don't know if this will actually fix the problem. What is `Discourse.current_hostname`? Is that a setting or is it derived from the request? In errbit the hostname is `http://robots.txt`, which makes me wonder if something is crawling the site by ip address /shrug","created_at":"2016-11-10T15:37:17Z","updated_at":"2016-11-10T15:37:17Z","html_url":"https://github.com/cph/discourse/pull/5#discussion_r87418975","pull_request_url":"https://api.github.com/repos/cph/discourse/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/cph/discourse/pulls/comments/87418975"},"html":{"href":"https://github.com/cph/discourse/pull/5#discussion_r87418975"},"pull_request":{"href":"https://api.github.com/repos/cph/discourse/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/cph/discourse/pulls/5","id":93172729,"html_url":"https://github.com/cph/discourse/pull/5","diff_url":"https://github.com/cph/discourse/pull/5.diff","patch_url":"https://github.com/cph/discourse/pull/5.patch","issue_url":"https://api.github.com/repos/cph/discourse/issues/5","number":5,"state":"open","locked":false,"title":"Added host to redirect_to","user":{"login":"lukebooth","id":1507076,"avatar_url":"https://avatars.githubusercontent.com/u/1507076?v=3","gravatar_id":"","url":"https://api.github.com/users/lukebooth","html_url":"https://github.com/lukebooth","followers_url":"https://api.github.com/users/lukebooth/followers","following_url":"https://api.github.com/users/lukebooth/following{/other_user}","gists_url":"https://api.github.com/users/lukebooth/gists{/gist_id}","starred_url":"https://api.github.com/users/lukebooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukebooth/subscriptions","organizations_url":"https://api.github.com/users/lukebooth/orgs","repos_url":"https://api.github.com/users/lukebooth/repos","events_url":"https://api.github.com/users/lukebooth/events{/privacy}","received_events_url":"https://api.github.com/users/lukebooth/received_events","type":"User","site_admin":false},"body":"I don't know if this is correct or not. I couldn't get it (the [error](https://errbit.cphepdev.com/apps/211/problems/11281)) to happen locally and also couldn't get the specs to run so I could write a test for it. `¯\\_(ツ)_/¯`","created_at":"2016-11-10T15:33:38Z","updated_at":"2016-11-10T15:37:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1efd2850f5f37c5519c8b0d9cb6f955718725223","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cph/discourse/pulls/5/commits","review_comments_url":"https://api.github.com/repos/cph/discourse/pulls/5/comments","review_comment_url":"https://api.github.com/repos/cph/discourse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cph/discourse/issues/5/comments","statuses_url":"https://api.github.com/repos/cph/discourse/statuses/4822d009dc1f5dce2ca12caf80c45292ec20cec3","head":{"label":"cph:redirect-fix","ref":"redirect-fix","sha":"4822d009dc1f5dce2ca12caf80c45292ec20cec3","user":{"login":"cph","id":1691248,"avatar_url":"https://avatars.githubusercontent.com/u/1691248?v=3","gravatar_id":"","url":"https://api.github.com/users/cph","html_url":"https://github.com/cph","followers_url":"https://api.github.com/users/cph/followers","following_url":"https://api.github.com/users/cph/following{/other_user}","gists_url":"https://api.github.com/users/cph/gists{/gist_id}","starred_url":"https://api.github.com/users/cph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cph/subscriptions","organizations_url":"https://api.github.com/users/cph/orgs","repos_url":"https://api.github.com/users/cph/repos","events_url":"https://api.github.com/users/cph/events{/privacy}","received_events_url":"https://api.github.com/users/cph/received_events","type":"Organization","site_admin":false},"repo":{"id":8565296,"name":"discourse","full_name":"cph/discourse","owner":{"login":"cph","id":1691248,"avatar_url":"https://avatars.githubusercontent.com/u/1691248?v=3","gravatar_id":"","url":"https://api.github.com/users/cph","html_url":"https://github.com/cph","followers_url":"https://api.github.com/users/cph/followers","following_url":"https://api.github.com/users/cph/following{/other_user}","gists_url":"https://api.github.com/users/cph/gists{/gist_id}","starred_url":"https://api.github.com/users/cph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cph/subscriptions","organizations_url":"https://api.github.com/users/cph/orgs","repos_url":"https://api.github.com/users/cph/repos","events_url":"https://api.github.com/users/cph/events{/privacy}","received_events_url":"https://api.github.com/users/cph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cph/discourse","description":"A platform for community discussion. Free, open, simple.","fork":true,"url":"https://api.github.com/repos/cph/discourse","forks_url":"https://api.github.com/repos/cph/discourse/forks","keys_url":"https://api.github.com/repos/cph/discourse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cph/discourse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cph/discourse/teams","hooks_url":"https://api.github.com/repos/cph/discourse/hooks","issue_events_url":"https://api.github.com/repos/cph/discourse/issues/events{/number}","events_url":"https://api.github.com/repos/cph/discourse/events","assignees_url":"https://api.github.com/repos/cph/discourse/assignees{/user}","branches_url":"https://api.github.com/repos/cph/discourse/branches{/branch}","tags_url":"https://api.github.com/repos/cph/discourse/tags","blobs_url":"https://api.github.com/repos/cph/discourse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cph/discourse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cph/discourse/git/refs{/sha}","trees_url":"https://api.github.com/repos/cph/discourse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cph/discourse/statuses/{sha}","languages_url":"https://api.github.com/repos/cph/discourse/languages","stargazers_url":"https://api.github.com/repos/cph/discourse/stargazers","contributors_url":"https://api.github.com/repos/cph/discourse/contributors","subscribers_url":"https://api.github.com/repos/cph/discourse/subscribers","subscription_url":"https://api.github.com/repos/cph/discourse/subscription","commits_url":"https://api.github.com/repos/cph/discourse/commits{/sha}","git_commits_url":"https://api.github.com/repos/cph/discourse/git/commits{/sha}","comments_url":"https://api.github.com/repos/cph/discourse/comments{/number}","issue_comment_url":"https://api.github.com/repos/cph/discourse/issues/comments{/number}","contents_url":"https://api.github.com/repos/cph/discourse/contents/{+path}","compare_url":"https://api.github.com/repos/cph/discourse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cph/discourse/merges","archive_url":"https://api.github.com/repos/cph/discourse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cph/discourse/downloads","issues_url":"https://api.github.com/repos/cph/discourse/issues{/number}","pulls_url":"https://api.github.com/repos/cph/discourse/pulls{/number}","milestones_url":"https://api.github.com/repos/cph/discourse/milestones{/number}","notifications_url":"https://api.github.com/repos/cph/discourse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cph/discourse/labels{/name}","releases_url":"https://api.github.com/repos/cph/discourse/releases{/id}","deployments_url":"https://api.github.com/repos/cph/discourse/deployments","created_at":"2013-03-04T21:26:09Z","updated_at":"2015-09-09T13:58:30Z","pushed_at":"2016-11-10T15:33:38Z","git_url":"git://github.com/cph/discourse.git","ssh_url":"git@github.com:cph/discourse.git","clone_url":"https://github.com/cph/discourse.git","svn_url":"https://github.com/cph/discourse","homepage":"http://www.discourse.org","size":98013,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"deploy"}},"base":{"label":"cph:deploy","ref":"deploy","sha":"6d38da60347bc3954620eb7f22ac8d2cf566e461","user":{"login":"cph","id":1691248,"avatar_url":"https://avatars.githubusercontent.com/u/1691248?v=3","gravatar_id":"","url":"https://api.github.com/users/cph","html_url":"https://github.com/cph","followers_url":"https://api.github.com/users/cph/followers","following_url":"https://api.github.com/users/cph/following{/other_user}","gists_url":"https://api.github.com/users/cph/gists{/gist_id}","starred_url":"https://api.github.com/users/cph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cph/subscriptions","organizations_url":"https://api.github.com/users/cph/orgs","repos_url":"https://api.github.com/users/cph/repos","events_url":"https://api.github.com/users/cph/events{/privacy}","received_events_url":"https://api.github.com/users/cph/received_events","type":"Organization","site_admin":false},"repo":{"id":8565296,"name":"discourse","full_name":"cph/discourse","owner":{"login":"cph","id":1691248,"avatar_url":"https://avatars.githubusercontent.com/u/1691248?v=3","gravatar_id":"","url":"https://api.github.com/users/cph","html_url":"https://github.com/cph","followers_url":"https://api.github.com/users/cph/followers","following_url":"https://api.github.com/users/cph/following{/other_user}","gists_url":"https://api.github.com/users/cph/gists{/gist_id}","starred_url":"https://api.github.com/users/cph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cph/subscriptions","organizations_url":"https://api.github.com/users/cph/orgs","repos_url":"https://api.github.com/users/cph/repos","events_url":"https://api.github.com/users/cph/events{/privacy}","received_events_url":"https://api.github.com/users/cph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cph/discourse","description":"A platform for community discussion. Free, open, simple.","fork":true,"url":"https://api.github.com/repos/cph/discourse","forks_url":"https://api.github.com/repos/cph/discourse/forks","keys_url":"https://api.github.com/repos/cph/discourse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cph/discourse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cph/discourse/teams","hooks_url":"https://api.github.com/repos/cph/discourse/hooks","issue_events_url":"https://api.github.com/repos/cph/discourse/issues/events{/number}","events_url":"https://api.github.com/repos/cph/discourse/events","assignees_url":"https://api.github.com/repos/cph/discourse/assignees{/user}","branches_url":"https://api.github.com/repos/cph/discourse/branches{/branch}","tags_url":"https://api.github.com/repos/cph/discourse/tags","blobs_url":"https://api.github.com/repos/cph/discourse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cph/discourse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cph/discourse/git/refs{/sha}","trees_url":"https://api.github.com/repos/cph/discourse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cph/discourse/statuses/{sha}","languages_url":"https://api.github.com/repos/cph/discourse/languages","stargazers_url":"https://api.github.com/repos/cph/discourse/stargazers","contributors_url":"https://api.github.com/repos/cph/discourse/contributors","subscribers_url":"https://api.github.com/repos/cph/discourse/subscribers","subscription_url":"https://api.github.com/repos/cph/discourse/subscription","commits_url":"https://api.github.com/repos/cph/discourse/commits{/sha}","git_commits_url":"https://api.github.com/repos/cph/discourse/git/commits{/sha}","comments_url":"https://api.github.com/repos/cph/discourse/comments{/number}","issue_comment_url":"https://api.github.com/repos/cph/discourse/issues/comments{/number}","contents_url":"https://api.github.com/repos/cph/discourse/contents/{+path}","compare_url":"https://api.github.com/repos/cph/discourse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cph/discourse/merges","archive_url":"https://api.github.com/repos/cph/discourse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cph/discourse/downloads","issues_url":"https://api.github.com/repos/cph/discourse/issues{/number}","pulls_url":"https://api.github.com/repos/cph/discourse/pulls{/number}","milestones_url":"https://api.github.com/repos/cph/discourse/milestones{/number}","notifications_url":"https://api.github.com/repos/cph/discourse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cph/discourse/labels{/name}","releases_url":"https://api.github.com/repos/cph/discourse/releases{/id}","deployments_url":"https://api.github.com/repos/cph/discourse/deployments","created_at":"2013-03-04T21:26:09Z","updated_at":"2015-09-09T13:58:30Z","pushed_at":"2016-11-10T15:33:38Z","git_url":"git://github.com/cph/discourse.git","ssh_url":"git@github.com:cph/discourse.git","clone_url":"https://github.com/cph/discourse.git","svn_url":"https://github.com/cph/discourse","homepage":"http://www.discourse.org","size":98013,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"deploy"}},"_links":{"self":{"href":"https://api.github.com/repos/cph/discourse/pulls/5"},"html":{"href":"https://github.com/cph/discourse/pull/5"},"issue":{"href":"https://api.github.com/repos/cph/discourse/issues/5"},"comments":{"href":"https://api.github.com/repos/cph/discourse/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/cph/discourse/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/cph/discourse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cph/discourse/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/cph/discourse/statuses/4822d009dc1f5dce2ca12caf80c45292ec20cec3"}}}}
{"actor":{"display_login":"ben5516"}}