check if ajax request before write xsrf to client