Adding X-Forwarded-Protocol header check for is_secure.