{"action":"opened","issue":{"url":"https://api.github.com/repos/prerender/prerender-node/issues/98","repository_url":"https://api.github.com/repos/prerender/prerender-node","labels_url":"https://api.github.com/repos/prerender/prerender-node/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/prerender/prerender-node/issues/98/comments","events_url":"https://api.github.com/repos/prerender/prerender-node/issues/98/events","html_url":"https://github.com/prerender/prerender-node/issues/98","id":131658552,"number":98,"title":"Support for Google App Engine SSL","user":{"login":"5inline","id":1702619,"avatar_url":"https://avatars.githubusercontent.com/u/1702619?v=3","gravatar_id":"","url":"https://api.github.com/users/5inline","html_url":"https://github.com/5inline","followers_url":"https://api.github.com/users/5inline/followers","following_url":"https://api.github.com/users/5inline/following{/other_user}","gists_url":"https://api.github.com/users/5inline/gists{/gist_id}","starred_url":"https://api.github.com/users/5inline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/5inline/subscriptions","organizations_url":"https://api.github.com/users/5inline/orgs","repos_url":"https://api.github.com/users/5inline/repos","events_url":"https://api.github.com/users/5inline/events{/privacy}","received_events_url":"https://api.github.com/users/5inline/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-05T14:29:08Z","updated_at":"2016-02-05T14:29:08Z","closed_at":null,"body":"We came across an issue when using prerender-node with an SSL site on GAE. GAE passes a header `x-appengine-https=\"on\"` for SSL requests. Adding:\r\n```\r\n  if( req.headers['x-appengine-https'] ) {\r\n    protocol = req.headers['x-appengine-https'] === 'on' ? 'https' : 'http';\r\n  }\r\n```\r\nto the `buildApiUrl` function seems to fix the issue."}}