{"action":"opened","issue":{"url":"https://api.github.com/repos/ajmueller/StopDrop/issues/5","labels_url":"https://api.github.com/repos/ajmueller/StopDrop/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/ajmueller/StopDrop/issues/5/comments","events_url":"https://api.github.com/repos/ajmueller/StopDrop/issues/5/events","html_url":"https://github.com/ajmueller/StopDrop/issues/5","id":83297884,"number":5,"title":"http -> https redirect","user":{"login":"ajmueller","id":1442179,"avatar_url":"https://avatars.githubusercontent.com/u/1442179?v=3","gravatar_id":"","url":"https://api.github.com/users/ajmueller","html_url":"https://github.com/ajmueller","followers_url":"https://api.github.com/users/ajmueller/followers","following_url":"https://api.github.com/users/ajmueller/following{/other_user}","gists_url":"https://api.github.com/users/ajmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/ajmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajmueller/subscriptions","organizations_url":"https://api.github.com/users/ajmueller/orgs","repos_url":"https://api.github.com/users/ajmueller/repos","events_url":"https://api.github.com/users/ajmueller/events{/privacy}","received_events_url":"https://api.github.com/users/ajmueller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-01T03:54:27Z","updated_at":"2015-06-01T03:54:27Z","closed_at":null,"body":"Since the deploy depends on https for auth, we could have perform the redirect in js, possibly in the following way:\r\n\r\n```javascript\r\n// early on\r\nvar PROD_ENV = 'prod';\r\nvar DEV_ENV = 'dev';\r\nvar CURRENT_ENV = DEV_ENV;\r\nif (location.hostname.indexOf('stopdrop.azurewebsites') !== -1) {\r\n    CURRENT_ENV = PROD_ENV;\r\n}\r\n\r\n// somewhat later on\r\n// any production specific setup\r\nif (CURRENT_ENV == PROD_ENV) {\r\n\r\n    // not on https\r\n    if (location.protocol.indexOf('https') === -1) {\r\n        var redirect_url = location.href.replace(location.protocol, \"https\");\r\n        window.location(redirect_url); // redirect\r\n    }\r\n\r\n}\r\n```\r\n\r\nNot the best solution, but works since we don't have access to DNS. I haven't tested the above code, but should be close to get started.\r\n\r\nTransferred from https://bitbucket.org/ajmueller/stopdrop/issue/8/http-https-redirect"}}