Im trying to make a request from one application to another. So i created some headers which are required by my application and filled them in for the Ajax Request. Here is my code:
$.ajax({
    method: 'GET',
    url: 'http://my-domain.com/apps/filters/get-filters',
    beforeSend: function(request){
        request.setRequestHeader("X-Webshop-Domain", window.location.host);
        request.setRequestHeader("X-Language", $('html').attr('lang'));
        request.setRequestHeader("X-Request-Protocol", window.location.protocol);
        request.setRequestHeader("X-Api-Version", '2');
    },
    headers: {
        "X-Webshop-Domain": window.location.host,
        "X-Language": $('html').attr('lang'),
        "X-Request-Protocol": window.location.protocol,
        "X-Api-Version": '2',
    },
    data: {}, success: function ( response )
    {
    }
});
Now when i load a page, this method is called but no response given. It gives me the "Header not allowed" issue. But when i check in my network tab (developer tools Chrome) i see my request, i see some headers but none of those. Does anybody has a idea how this is possible or what im doing wrong?
 
    