{"action":"created","issue":{"url":"https://api.github.com/repos/pandastrike/pbx/issues/26","labels_url":"https://api.github.com/repos/pandastrike/pbx/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/pandastrike/pbx/issues/26/comments","events_url":"https://api.github.com/repos/pandastrike/pbx/issues/26/events","html_url":"https://github.com/pandastrike/pbx/issues/26","id":75530285,"number":26,"title":"Is It Possible to Determine the Request Protocol?","user":{"login":"PandaPup","id":6767448,"avatar_url":"https://avatars.githubusercontent.com/u/6767448?v=3","gravatar_id":"","url":"https://api.github.com/users/PandaPup","html_url":"https://github.com/PandaPup","followers_url":"https://api.github.com/users/PandaPup/followers","following_url":"https://api.github.com/users/PandaPup/following{/other_user}","gists_url":"https://api.github.com/users/PandaPup/gists{/gist_id}","starred_url":"https://api.github.com/users/PandaPup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PandaPup/subscriptions","organizations_url":"https://api.github.com/users/PandaPup/orgs","repos_url":"https://api.github.com/users/PandaPup/repos","events_url":"https://api.github.com/users/PandaPup/events{/privacy}","received_events_url":"https://api.github.com/users/PandaPup/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pandastrike/pbx/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"dyoder","id":1859,"avatar_url":"https://avatars.githubusercontent.com/u/1859?v=3","gravatar_id":"","url":"https://api.github.com/users/dyoder","html_url":"https://github.com/dyoder","followers_url":"https://api.github.com/users/dyoder/followers","following_url":"https://api.github.com/users/dyoder/following{/other_user}","gists_url":"https://api.github.com/users/dyoder/gists{/gist_id}","starred_url":"https://api.github.com/users/dyoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyoder/subscriptions","organizations_url":"https://api.github.com/users/dyoder/orgs","repos_url":"https://api.github.com/users/dyoder/repos","events_url":"https://api.github.com/users/dyoder/events{/privacy}","received_events_url":"https://api.github.com/users/dyoder/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-05-12T09:11:52Z","updated_at":"2015-05-12T18:46:39Z","closed_at":null,"body":"@dyoder, I'd like to examine the protocol (HTTP or HTTPS) of the incoming request to an API handler.  By using `context.request.headers.host`, I can retrieve everything *but* the protocol.  I've looked at the example app and the rather large context object that handlers get, but nothing jumps out at me.\r\n\r\nFor the time being, I've got a work-around.  Is it just that PBX doesn't support protocol detection, or is it more fundamental to how this kind of messaging works?"},"comment":{"url":"https://api.github.com/repos/pandastrike/pbx/issues/comments/101383263","html_url":"https://github.com/pandastrike/pbx/issues/26#issuecomment-101383263","issue_url":"https://api.github.com/repos/pandastrike/pbx/issues/26","id":101383263,"user":{"login":"PandaPup","id":6767448,"avatar_url":"https://avatars.githubusercontent.com/u/6767448?v=3","gravatar_id":"","url":"https://api.github.com/users/PandaPup","html_url":"https://github.com/PandaPup","followers_url":"https://api.github.com/users/PandaPup/followers","following_url":"https://api.github.com/users/PandaPup/following{/other_user}","gists_url":"https://api.github.com/users/PandaPup/gists{/gist_id}","starred_url":"https://api.github.com/users/PandaPup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PandaPup/subscriptions","organizations_url":"https://api.github.com/users/PandaPup/orgs","repos_url":"https://api.github.com/users/PandaPup/repos","events_url":"https://api.github.com/users/PandaPup/events{/privacy}","received_events_url":"https://api.github.com/users/PandaPup/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T18:46:39Z","updated_at":"2015-05-12T18:46:39Z","body":"Oh, okay.  [This file][1] is the function that would take note of the protocol.  Once I have the fully formed URL, I'd place it into the panda-cluster configuration object [on this line][2].  In the panda-cluster library, you can see I reference that object when I call out to the Huxley API [here][3]\r\n\r\n[1]:https://github.com/pandastrike/huxley/blob/development/alpha-06/huxley-api/src/api/handlers/cluster/delete.coffee\r\n[2]:https://github.com/pandastrike/huxley/blob/development/alpha-06/huxley-api/src/api/handlers/cluster/delete.coffee#L33\r\n[3]:https://github.com/pandastrike/panda-cluster/blob/development/alpha-06/src/huxley.coffee#L16"}}