{"action":"created","issue":{"url":"https://api.github.com/repos/cben/mathdown/issues/80","labels_url":"https://api.github.com/repos/cben/mathdown/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/cben/mathdown/issues/80/comments","events_url":"https://api.github.com/repos/cben/mathdown/issues/80/events","html_url":"https://github.com/cben/mathdown/issues/80","id":58306688,"number":80,"title":"Redirects","user":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cben/mathdown/labels/4%20-%20Working","name":"4 - Working","color":"009800"},{"url":"https://api.github.com/repos/cben/mathdown/labels/prod.gh-pages","name":"prod.gh-pages","color":"0052cc"},{"url":"https://api.github.com/repos/cben/mathdown/labels/prod.heroku","name":"prod.heroku","color":"5319e7"},{"url":"https://api.github.com/repos/cben/mathdown/labels/prod.rhcloud","name":"prod.rhcloud","color":"e11d21"},{"url":"https://api.github.com/repos/cben/mathdown/labels/security","name":"security","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cben/mathdown/milestones/1","html_url":"https://github.com/cben/mathdown/milestones/%22beta%22","labels_url":"https://api.github.com/repos/cben/mathdown/milestones/1/labels","id":1238329,"number":1,"title":"\"beta\"","description":"Stuff I consider embarassing / essential enough that I must fix it before removing \"Alpha quality\" label and telling people (e.g. Show HN).\r\n\r\n<!---\r\n@huboard:{\"order\":1.0}\r\n-->\r\n","creator":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":0,"state":"open","created_at":"2015-08-03T13:29:02Z","updated_at":"2015-10-04T12:03:48Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-02-20T03:36:50Z","updated_at":"2015-10-04T12:03:48Z","closed_at":null,"body":"[Followup from #6]\nTODO: intelligent redirects (and/or rel=canonical) http->https, and .com -> .net.\n\nWant both server-side redirect from server.js and client side for GH Pages https.\nShould constrain redirects to known domains, to not mess up 3rd-party forks.\n\nCan I allow HTTP for non-SNI clients?  Should I (consider `#doc=secret` for this case)?\nClient-side could fetch redirect.js over https to be sure it works.\n\nShould look into libs for running same routing logic on client and server.\nOpenshift (and probably Heroku) terminate TLS in the reverse proxy; need to check x-forwarding [https://help.openshift.com/hc/en-us/articles/203263674-What-external-ports-are-available-on-OpenShift-]\n\nAfter some time it's stable, enable HSTS — should be possible simply by setting response header.\ngood checklist doc for migration to HTTPS: https://docs.google.com/document/d/1oRXJUIttqQxuxmjj2tgYjj096IKw4Zcw6eAoIKWZ2oQ/edit#\n\r\n\r\n<!---\r\n@huboard:{\"order\":2.875,\"milestone_order\":80.0,\"custom_state\":\"\"}\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/cben/mathdown/issues/comments/145339929","html_url":"https://github.com/cben/mathdown/issues/80#issuecomment-145339929","issue_url":"https://api.github.com/repos/cben/mathdown/issues/80","id":145339929,"user":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"created_at":"2015-10-04T12:03:48Z","updated_at":"2015-10-04T12:03:48Z","body":"Errors on staging-mathdown.rhcloud.com:\r\n```\r\n[2015-10-04T12:01:36.270Z] GET http undefined / < 127.12.91.1 undefined\r\n/var/lib/openshift/55eeb1ad89f5cf2f21000102/app-root/runtime/repo/redirects.js:31\r\n  host = host.toLowerCase();\r\n              ^\r\nTypeError: Cannot call method 'toLowerCase' of undefined\r\n  at Object.computeRedirect (/var/lib/openshift/55eeb1ad89f5cf2f21000102/app-root/runtime/repo/redirects.js:31:15)\r\n  at Server.handleRequest (/var/lib/openshift/55eeb1ad89f5cf2f21000102/app-root/runtime/repo/server.coffee:27:21)\r\n  at Server.emit (events.js:117:20)\r\n  at HTTPParser.parser.onIncoming (http.js:2113:12)\r\n  at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:122:23)\r\n  at Socket.socket.ondata (http.js:1971:22)\r\n  at TCP.onread (net.js:528:27)\r\nDEBUG: Program coffee server.coffee exited with code 8\r\nDEBUG: Starting child process with 'coffee server.coffee'\r\nHttpServer up, e.g. http://localhost:8080/?doc=demo\r\n```\r\ncaused by haproxy not providing host header.\r\nI need a test for that."}}