By shareefhadid
Hi,
I am working on an node/express server and have set up nginx with lets encrypt and cerbot on my Droplet. When I access my ip I get the green lock and it says the connection is secure. However, when I try to log req.secure in Express it returns false. As a result, I am having trouble using session authentication with secure cookies.
Some posts are suggesting it could be due to the proxy or load balancer. I am not super familiar with with Digital Ocean, is the a problem others have had? Did I set up my SSL incorrectly (and somehow still get the green lock)?
Thank you in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Could you confirm how exactly didi you issue an SSL certificate for your IP address? If you run an SSL check for your IP do you get any errors:
https://www.sslshopper.com/ssl-checker.html
Usually, I tend to stick to Let’s encrypt as per this tutorial here:
If you don’t yet have a domain name for that specific project, you could register a free one with Freenom.
Regards, Bobby
Sorry, I forgot to update this. The issue was with my NGINX Config Headers (Forwarder headers in particular).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.