I'm working with an .Net Core web app and I need to verify the request is HTTPS. I have installed a certificate in Azure with Let's encrypt and I have a cloudflare CDN but always shows me as if the request was not HTTPS.
I've used
this.Request.Scheme.Equals("https")
and
this.Request.IsHttps
Do you have any idea what's happenning?
The Cloudflare CDN, although it serves your requests as HTTPS, is actually making the request to your website as HTTP.
You are likely using Cloudflare's Flexible mode. You likely want to use one of the Full modes.
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