title: How to fix when a service has been blocked by cors policy: no 'access-control-allow-origin' header is present on the requested resource
body: <p>I'm trying to access the text-to-speech service provided by IBM Watson in my NodeJs application but I see access denial error as the service has been blocked by CORS policy. Tried all the ways by setting up related headers in app.js but fail to resolve the issue.</p>
  
  <p><a href="https://cloud.ibm.com/apidocs/text-to-speech?code=node" rel="nofollow noreferrer">https://cloud.ibm.com/apidocs/text-to-speech?code=node</a></p>
  
  <pre><code>app.use(function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "http://localhost:3000");
    res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
    next();
  });
  </code></pre>
  
  <p>Whenever I send any text from my NodeJS application a speech should be heard saying the relative response.</p>