I'm trying to detect if the current page is being delivered via SSL in order to decide whethe开发者_运维技巧r 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?
精彩评论