The 2 conditions on HTTP_X_FORWARDED_PROTO go together hence additional brackets were added to complete the logical expression.