title: Headers aren't being set on POST response
body: <p>I've got a POST API endpoint written in Go, and I'm setting a header called Set-Cookie in the Golang response. I've set up cors and the call is returning the correct values. The problem is that the headers in the response are empty. If I look at my network tab, it says that my Set-Cookie header is being returned with the value I'm expecting, it's just in angular that it's empty (see screenshots of the console.log of my response.headers and my network tab).</p>
  <h1>EDIT</h1>
  <p>adding a picture of what my cookies look like in chrome on subsequent requests after te Set-Cookie header has been set in golang. Doesn't look like chrome auto sets the cookies.</p>
  <h1>EDIT</h1>
  <p>So, it definitely seems like it's a browser issue. When I hit the endpoint with postman the cookie is definitely set. I don't necessarily want to get the cookie in angular, I just want to set the cookie in the browser.</p>
  <p><a href="https://i.stack.imgur.com/YURr6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YURr6.png" alt="enter image description here" /></a></p>
  <p>My angular code:</p>
  <pre><code>login(user): Subscription {
      return this.http
        .post(`${SERVICE_URL}/login`, user, {
          observe: 'response',
          headers: new HttpHeaders({'Content-Type': 'application/json'})
        })
        .subscribe((response: HttpResponse&lt;any&gt;) =&gt; {
         console.log(response.headers);
        }, (response) =&gt; {
          this._user$.next(null);
          console.log(response);
        });
    }
  </code></pre>
  <p>my cors settings in the golang server using rs/cors</p>
  <pre><code>c := cors.New(cors.Options{
          AllowedMethods: []string{&quot;GET&quot;,&quot;POST&quot;, &quot;PUT&quot;, &quot;OPTIONS&quot;},
          AllowedOrigins: []string{&quot;http://localhost:4200&quot;, &quot;localhost:4200&quot;},
          AllowedHeaders: []string{&quot;X-Requested-With&quot;, &quot;Content-Type&quot;, &quot;Authorization&quot;, &quot;Set-Cookie&quot;},
          ExposedHeaders: []string{&quot;Set-Cookie&quot;},
          AllowCredentials: true,
      })
  </code></pre>
  <p><a href="https://i.stack.imgur.com/gh6Be.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gh6Be.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Yp9gl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yp9gl.png" alt="enter image description here" /></a></p>