For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
1 1 5 6

Access-Control-Allow-Origin

When I trace the results I am getting the following error

Kindly advice

Failed to load https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/groups: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://cbq2-svu-dgact1' is therefore not allowed access.

world-checkworld-check-oneauthentication
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
4.2k 7 5 6

@osama.sammour

I assume you are sending the request using your chrome browser.

As per my understanding, sending request using XMLHTTP request to a different domain than the page you are on will be blocked. As you are attempting a cross domain request, you need to utilize the CORS.

I am sending few link below which has a simplified tutorial on how to use CORS to make the request successful.

https://www.html5rocks.com/en/tutorials/cors/#toc-introduction (Check out the “Cross-Domain from Chrome Extensions” section)

https://developer.chrome.com/extensions/xhr

Please check the below posts in stack overflow where developers have faced a similar problem while sending a HTTP request from JS.

https://stackoverflow.com/questions/13400594/understanding-xmlhttprequest-over-cors-responsetext/13400954#13400954

https://stackoverflow.com/questions/10636611/how-does-access-control-allow-origin-header-work

https://stackoverflow.com/questions/20035101/why-does-my-javascript-get-a-no-access-control-allow-origin-header-is-present

The easy way is to just add the extension in google chrome to allow access using CORS.

https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en-US

Just enable this extension whenever you want allow access to no 'access-control-allow-origin'header request.

Or

In Windows, paste this command in run window

chrome.exe --user-data-dir="C:/Chrome dev session"--disable-web-security

this will open a new chrome browser which allow access to no 'access-control-allow-origin'header request

Kindly let me know if you were solve the problem.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea