Index: functions.php
===================================================================
--- functions.php	(revision 20632)
+++ functions.php	(working copy)
@@ -2941,6 +2941,10 @@
 			return true;
 	} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
 		return true;
+	} elseif ( isset($_SERVER['HTTP_X_FORWARDED_PORT']) && ( '443' == $_SERVER['HTTP_X_FORWARDED_PORT'] ) ) {
+		return true;
+	} elseif ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && ( 'https' == strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) ) ) {
+		return true;
 	}
 	return false;
 }
