Documentation suggests you can check TLS on the request object, but that appears to be nil (on heroku at least).
Looking at the Heroku documentation, it appears that HTTPS is terminated upstream of your application.
Check the request's Headers for a X-Forwarded-Proto header with the value https.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With