Reputation: 54989
I have an express server that I'm using. I'm turning on ssl in cloudflare with a pro account with flexible SSL. This means that I can just turn it on and it should automatically work without any server side changes? Or is there something I have to do on the server?
Upvotes: 1
Views: 2207
Reputation: 38851
You don't need to do much on the server side. However, you do need to remember that the requests are coming from CloudFlare's server, not directly from clients. So if you want to get the client's IP address then you need to look at the X-Forwarded-For
header.
Also, you want to make sure any redirects you do are relative. If you need to do an absolute redirect, make sure it has https
instead of http
.
Upvotes: 3