title: Posting data to SDC HTTP server url from JavaScript shows CORS issue
body: <p>I am using Streamsets pipeline for streaming data from browsers. So for that, I created a pipeline with HTTP server origin to post data from browsers Javascript and tried to write in that URL using REST client, and it writes successfully.  Response Headers are already set in the SDC.properties file.  </p>
  
  <pre><code>http.access.control.allow.origin=*
  http.access.control.allow.headers=origin, content-type, accept, authorization, x-requested-by, x-ss-user-auth-token, x-ss-rest-call
  http.access.control.allow.methods=GET, POST, PUT, DELETE, OPTIONS, HEAD
  </code></pre>
  
  <p>But when I try to write some data from JavaScript using <strong>XMLHTTPRequest</strong>, it throws error for pre-flight request. Below is the JavaScript code: </p>
  
  <pre><code>  var http = new XMLHttpRequest();
    var value = '{ "prop1": "value 2", "prop2": "value 2" }';
    var url ='http://13.68.93.97:8100/'
    var async = true
   if ('withCredentials' in http) {
      http.open('OPTIONS', url, async);
  } else if (typeof XDomainRequest != "undefined") {
      http = new XDomainRequest(); //for IE
      http.open('OPTIONS', url);
  } else {
      http.open('OPTIONS', url, async);
  }
      http.open('POST', url, true);
      http.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
      http.setRequestHeader('X-SDC-APPLICATION-ID', 'testApp1');
  http.setRequestHeader("Access-Control-Allow-Origin", "*");
  http.setRequestHeader('Access-Control-Allow-Methods', "POST, OPTIONS, GET");
  http.setRequestHeader('Access-Control-Allow-Credentials', "true");
  http.setRequestHeader('Access-Control-Expose-Headers', "X-Region");
  http.setRequestHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept,Accept-language");
  http.withCredentials = true;
  http.onreadystatechange = function () {
      if (http.readyState == 4 &amp;&amp; http.status == 200) {
          console.log(http.responseText);
      }
  }
  http.send(value); 
  </code></pre>
  
  <p>Error thrown from the above code execution :</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="http://13.68.93.97:8100/" rel="nofollow noreferrer">http://13.68.93.97:8100/</a>. Response to
    preflight request doesn't pass access control check: No
    'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>' is therefore not allowed access.</p>
  </blockquote>
  
  <p>Any help will be really helpful. Thanks..!!</p>