I am developing an application using Watson's Dialog service, where the API is accessed in client-side javascript, but ran into the following problem when trying to access the API.
XMLHttpRequest cannot load https://gateway.watsonplatform.net/dialog/api. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. The response had HTTP status code 401.
The solution seems to be Cross Origin Resource Sharing, but I cannot find a way to enable this for a Watson service. Is there a way to do this? If not, is there another way around this? I was only able to find resources for enabling it for an application that we deploy ourselves.
If I'm understanding correctly this won't be a problem if our application is deployed to BlueMix, instead of being tested locally. If possible, though, we would like to be able to test locally when possible for speed of development.
Thanks for your help!