Access odata using ajax

HI,
i created a server odataLoginTestServer.zip (218.2 KB)
in Delphi 10.2 (RemObjects SDK Version 9.3.105.1345) and i trying to get the data by odata request using javascript.
Since the server requires authentication , i trying to pass the auth params to the server by following code :

 $.ajax({
      beforeSend: function (xhr) {
        xhr.setRequestHeader ("Authorization", "Basic " + btoa("user" + ":" + "pw"));
       },
      url: "http://10.18.18.82:8099/odata/",
      type: "GET",
      success: function (response, status) {
       console.log(response);
      }
   });

And then I hit this problem :
%E6%8D%95%E8%8E%B7

i also try follwing code and hit another problem:

$.ajax({
    xhrFields: {
        withCredentials: true
    },
    beforeSend: function (xhr) {
        xhr.setRequestHeader('Authorization', 'Basic ' + btoa('test:test'));
    },
    url: "http://10.18.18.82:8085/odata/"
});

%E6%8D%95%E8%8E%B72

So how can i access the odata with authorization by using ajax?
Thank

try to update uROCustomHTTPServer.pas:

aResponse.Headers[id_AccessControlAllowHeaders] := id_ContentType;

with

aResponse.Headers[id_AccessControlAllowHeaders] := id_ContentType+', '+id_Authorization;

will it solve this issue?

Thanks, logged as bugs://79488

Thanks, logged as bugs://79489

bugs://79488 got closed with status nochangereq.

bugs://79489 got closed with status fixed.