Currently if js challenge is enabled in our config we send js challenge to client on challengeble request (request with Accept header text/html). However, in CloudFare this is implemented differently. CloudFare allow the administrator to set up rules (which can be very defferent) according to which a challenge is sent to the client. It is a very good implementation, so we decide to implement the same ability in our config