EllisLab/CodeIgniter — pull request #2240 by chrispassas (2013-02-12 22:01:59+00:00)
Title: Update system/core/Common.php

If using nginx instead of apache by default nginx will not populate the $_SERVER['HTTPS'] value. This change allows falling back to checking the port number of the request to determine if your on SSL or not.

The other option is adding the following to your nginx config.

fastcgi_param HTTPS on; #some php apps require this to detent https