My problem is that I can not send the correct request to the server to get an answer from him in the form of a json line. 
Here is my code:
$.ajax({
    type: "GET",
    url: url,
    dataType: 'json',
    crossDomain: true,
    username: 'username',
    password: 'password',
    headers: {
        'Access-Control-Allow-Origin': '*'
    },
    success: function(response) {
        console.log(response);
    }
})
When I try to send a request, I get an error:
XMLHttpRequest cannot load URL. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.