Please help, I can not find a way to determine if the user is using http or https protocols to access my meteor site. On the client side I can easily just use window.location.protocol but on the server side I am having a much more difficult time.
The reason I am doing this is so I can set the ROOT_URL variable before it is used by the Oauth logins.
The hope was to allow users to use both ssl and non-ssl. I actually found a solution that answers my exact question though. You can access the protocol using the Header ‘x-forwareded-proto’ set by meteor when accessing using https.