By default dotcloud allows me to access my node instance via HTTPS, but i should allow only the HTTPS and forward every HTTP request to HTTPS.
How should I do it on dotcloud platform?
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
dotCloud provides an additional header: x-forwarded-proto which allows you to know the proxy source.
In your code you can use req.headers[‘x-forwarded-proto’] ( is either ‘http’ or ‘https’ ) to know the source. When it’s http you can then redirect to the https.