Cross-Origin Request Blocked

Hello everyone ,
I’m a newbie to this community and i’de like some help on this matter every time we try using the http method called xmlHttpRequest() to access ARI resources from outside the asterisk server the error bellow happens but when i send my request using the postman and curl it works perfectly .
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://x.x.x.x:8089/ari/applications/hello-world/subscription?eventSource=channel:,endpoint:,bridge:,deviceState:. (Reason: CORS preflight channel did not succeed).

Thanks in advance.

This is being imposed by the browser.

I think you have accessed scripting from one host, but it is trying to access another. They may be synonyms, but the browser doesn’t know.

Thanks for your answer and you are absolutely right we are indeed trying to access from another host to the server so how can i make the browser know the host and should we make some additional configurations so it can make it or what exactly ???
ps: when we are in asterisk server it works perfectly but outside it doesn’t.

That’s a browser question, not an Asterisk one. There may well be an option to disable that check, but I would advise not using the browser on the internet if you do so.

Thank you once more for your answer i have tried all of your suggestions but it doesn’t seem to work out it shows the same error message can we solve it with another approach like a proxy in the web server.