Getting the below error message while calling the API. I have added all the possible options in the header. Please take a look at the JS code and the error message below and suggest me a solution.
JS Code:
--------------
xhr.open("POST", "https://apitest.authorize.net/xml/v1/request.api");
xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
xhr.setRequestHeader("Access-Control-Allow-Headers", "Origin, Accept, Accept-Encoding, Connection, Content-Type, cache-control, method, X-Requested-With, Access-Control-Request-Method, Access-Control-Request-Headers,Authorization,X-Auth-Token");
xhr.setRequestHeader("Access-Control-Allow-Methods","GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS");
xhr.setRequestHeader("Content-Type", "application/json");
//xhr.setRequestHeader("Access-Control-Allow-Origin", "application/json");
xhr.send(data);
Error:
----------
Access to XMLHttpRequest at 'https://apitest.authorize.net/xml/v1/request.api' from origin 'https://****.com' has been blocked by CORS policy: Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.
05-27-2020 08:05 PM
Ensure that the domain with the Access-Control-Allow-Origin header is exactly the same as the one your are calling https://apitest.authorize.net/xml/v1/request.api from. For example www.domain.com is considered to be a diffferent domain than domain.com, as is the port https vs http.
If you have a public URL that you are https://apitest.authorize.net/xml/v1/request.api from, we could inspect it for you.
05-28-2020 04:35 AM
Thanks for your response. It is resolved after removing all the headers.
05-28-2020 09:52 AM
Getting a Telegram assembling to that size is certainly not a basic achievement and do you anytime need 200,000 people in your social event? To help you with guiding your social occasion to the right size, Telegram offers both treadtopic Telegram Public Group and Telegram Private Groups.
07-02-2020 11:33 PM
know we are entertaining with some whatsapp group links not to verified to here just close your eyes and click here you may land in the page it will help you
08-06-2020 08:31 PM
for its you need a good tech news so lets clcik it and get good js code definder
08-06-2020 08:39 PM
06-03-2021 12:07 AM