I'm trying to detect if the current page is being delivered via SSL in order to decide whether or not to include certain unsecure external resources. My current method involves checking if request.url
starts with 'https'. Is this the simplest way of accomplishing this? Is there a better way? Thanks!
In a controller or view:
request.ssl?
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