Add actual reverse proxy SSL support by inserting line before the rest of wordpress is loaded. Per http://codex.wordpress.org/Function_Reference/is_ssl