title: Golang, cors and angularjs - header missing
body: <p>I'm using <a href="https://github.com/rs/cors" rel="nofollow">rs/cors</a> in my Go API to allow my Angularjs app to make direct requests. I've added the following code to configure CORS:</p>
  
  <pre><code>crs := cors.New(cors.Options{AllowCredentials: true})
  n.Use(crs) //Negroni include
  </code></pre>
  
  <p>but I'm getting the <strong>No 'Access-Control-Allow-Origin' header is present on the requested resource</strong> message in the browser when I make a request.</p>
  
  <p>My request looks like this:</p>
  
  <pre><code>var req = {
      method: 'POST',
      url: endPoint + version + method,
      headers: {
          'Authorization': 'Basic ' + btoa(':' + appId)
      },
      data: params
  }
  
  $http(req).
      success(function(data, status, headers, config) {
          callback(null, data);
      }).
      error(function(data, status, headers, config) {
          callback(data);
      });
  </code></pre>
  
  <p>How can I get round this?</p>